/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #6ec1e3 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Navigation Header */
.main-nav {
    width: 100%;
    max-width: 900px;
    margin-bottom: 20px;
    z-index: 100;
    position: relative;
}

.nav-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo-link {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-logo-link:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(110, 193, 227, 0.8));
}

.nav-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-title {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(110, 193, 227, 0.8);
    transition: all 0.3s ease;
}

.nav-title:hover {
    text-shadow: 0 0 20px rgba(110, 193, 227, 1);
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(110, 193, 227, 0.3);
    text-shadow: 0 0 10px rgba(110, 193, 227, 0.8);
}

/* Footer */
.main-footer {
    width: 100%;
    max-width: 900px;
    margin-top: 30px;
    z-index: 100;
    position: relative;
}

.footer-content {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    gap: 15px;
}

.footer-text p {
    color: white;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.footer-social {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.social-link:hover {
    color: white;
    background: rgba(110, 193, 227, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(110, 193, 227, 0.4);
}

/* About Me Page Styles */
.about-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: fadeInUp 0.8s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.about-header {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid rgba(110, 193, 227, 0.8);
    box-shadow: 0 0 30px rgba(110, 193, 227, 0.6);
    object-fit: cover;
    animation: fadeInDown 0.8s ease-out;
}

.about-title {
    color: white;
    font-size: 2.5rem;
    text-shadow: 0 0 20px rgba(110, 193, 227, 0.8);
    font-weight: 700;
    letter-spacing: 2px;
}

.about-content {
    max-width: 100%;
}

.about-section {
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.about-section:nth-child(2) { animation-delay: 0.1s; }
.about-section:nth-child(3) { animation-delay: 0.2s; }
.about-section:nth-child(4) { animation-delay: 0.3s; }
.about-section:nth-child(5) { animation-delay: 0.4s; }
.about-section:nth-child(6) { animation-delay: 0.5s; }

.about-heading {
    color: #6ec1e3;
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.about-text {
    color: white;
    font-size: 1rem;
    line-height: 1.6;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.tech-item {
    background: rgba(110, 193, 227, 0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(110, 193, 227, 0.5);
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: rgba(110, 193, 227, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(110, 193, 227, 0.4);
}

.about-list {
    list-style: none;
    padding: 0;
}

.about-list li {
    color: white;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
}

.about-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: #6ec1e3;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(110, 193, 227, 0.8);
}

/* Animated Ice Particles Background */
.ice-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(2px 2px at 70% 40%, white, transparent);
    background-size: 200% 200%;
    animation: sparkle 20s linear infinite;
    opacity: 0.6;
    z-index: 0;
}

@keyframes sparkle {
    0%, 100% {
        background-position: 0% 0%, 100% 100%, 50% 50%, 80% 10%, 90% 60%, 33% 80%, 70% 40%;
    }
    50% {
        background-position: 100% 100%, 0% 0%, 25% 75%, 60% 30%, 70% 80%, 53% 60%, 50% 60%;
    }
}

/* Main Container */
.container {
    max-width: 900px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Header Section */
.header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease-out;
}

.title {
    font-size: 3rem;
    color: white;
    text-shadow: 0 0 20px rgba(110, 193, 227, 0.8),
                 0 0 40px rgba(110, 193, 227, 0.5);
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Glassmorphism Card Styles */
.main-card,
.history-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: fadeInUp 0.8s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-card:hover,
.history-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.history-card {
    margin-top: 30px;
    animation-delay: 0.2s;
}

/* Labels */
.label {
    display: block;
    color: white;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Text Input and Output */
.text-input,
.text-output {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    resize: vertical;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.text-input::placeholder,
.text-output::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.text-input:focus,
.text-output:focus {
    outline: none;
    border-color: #6ec1e3;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 20px rgba(110, 193, 227, 0.5),
                inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* NEW: Error Message Style */
.error-message {
    color: #ffcccc; /* Light red/pink */
    background: rgba(255, 100, 100, 0.2);
    border: 1px solid rgba(255, 100, 100, 0.6);
    border-radius: 8px;
    padding: 10px 15px;
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message:not(.hidden) {
    animation: fadeInDown 0.3s ease-out;
}

.error-message.hidden {
    display: none;
}

.password-section.hidden {
    display: none;
}

/* NEW: Password Section Styles */
.password-section {
    margin-bottom: 20px;
}

.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input {
    width: 100%;
    padding: 15px 50px 15px 15px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.password-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.password-input:focus {
    outline: none;
    border-color: #6ec1e3;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 20px rgba(110, 193, 227, 0.5),
                inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: all 0.3s ease;
    z-index: 1;
}

.password-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: scale(1.1);
}

.password-toggle:active {
    transform: scale(0.95);
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 10px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.strength-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.strength-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.strength-bars {
    display: flex;
    gap: 4px;
}

.strength-bar {
    width: 25px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.strength-bar.active {
    transform: scaleY(1.2);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.strength-bar.active.weak {
    background: linear-gradient(90deg, #ff6b6b 0%, #ff5252 100%);
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.5);
}

.strength-bar.active.medium {
    background: linear-gradient(90deg, #ffd93d 0%, #f6c23e 100%);
    box-shadow: 0 0 8px rgba(255, 217, 61, 0.5);
}

.strength-bar.active.strong {
    background: linear-gradient(90deg, #6ec1e3 0%, #4a9fb8 100%);
    box-shadow: 0 0 8px rgba(110, 193, 227, 0.5);
}

.strength-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* NEW: Custom Key Section Wrapper */
.custom-key-section {
    margin-bottom: 20px;
}

/* NEW: Custom Key Option Styles */
.custom-key-option {
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.checkbox-container:hover {
    color: #6ec1e3;
}

.custom-key-checkbox {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.custom-key-checkbox:checked + .checkbox-custom {
    background: linear-gradient(135deg, #6ec1e3 0%, #4a9fb8 100%);
    border-color: #6ec1e3;
    box-shadow: 0 0 10px rgba(110, 193, 227, 0.5);
}

.custom-key-checkbox:checked + .checkbox-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.checkbox-label {
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

/* NEW: Built-in Key Info Styles */
.builtin-key-info {
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-out;
}

.info-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(110, 193, 227, 0.2) 0%, rgba(74, 159, 184, 0.2) 100%);
    border: 1px solid rgba(110, 193, 227, 0.4);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.info-box:hover {
    background: linear-gradient(135deg, rgba(110, 193, 227, 0.3) 0%, rgba(74, 159, 184, 0.3) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(110, 193, 227, 0.3);
}

.info-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 5px rgba(110, 193, 227, 0.6));
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-title {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.info-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input Section */
.input-section {
    margin-bottom: 20px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-icon {
    font-size: 1.3rem;
    position: relative;
    z-index: 1;
}

.btn span {
    position: relative;
    z-index: 1;
}

.btn-encrypt {
    background: linear-gradient(135deg, #6ec1e3 0%, #4a9fb8 100%);
    color: white;
}

.btn-encrypt:hover {
    background: linear-gradient(135deg, #5ab0d2 0%, #3a8fa8 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(110, 193, 227, 0.5);
}

.btn-decrypt {
    background: linear-gradient(135deg, #a8e6cf 0%, #7fc8a8 100%);
    color: white;
}

.btn-decrypt:hover {
    background: linear-gradient(135deg, #98d6bf 0%, #6fb898 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(168, 230, 207, 0.5);
}

.btn:active {
    transform: translateY(-1px);
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.mode-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mode-btn.active {
    background: rgba(110, 193, 227, 0.3);
    color: white;
    box-shadow: 0 2px 10px rgba(110, 193, 227, 0.3);
}

.mode-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Mode Sections */
.mode-section {
    display: none;
}

.mode-section.active {
    display: block;
}

/* File Input Section */
.file-input-section {
    margin-bottom: 20px;
}

.file-drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 15px;
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
    border-color: #6ec1e3;
    background: rgba(110, 193, 227, 0.1);
    transform: scale(1.02);
}

.file-drop-content p {
    color: white;
    margin: 10px 0;
    font-size: 1.1rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.file-drop-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.file-browse-link {
    color: #6ec1e3;
    text-decoration: underline;
    cursor: pointer;
}

.file-browse-link:hover {
    color: #4a9fb8;
}

.file-drop-hint {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin-top: 5px;
}

/* File List */
.file-list {
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.file-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.file-item-icon {
    font-size: 1.5rem;
}

.file-item-details {
    flex: 1;
}

.file-item-name {
    color: white;
    font-weight: 600;
    margin-bottom: 2px;
    word-break: break-all;
}

.file-item-size {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.file-item-remove {
    background: rgba(255, 100, 100, 0.2);
    border: 1px solid rgba(255, 100, 100, 0.5);
    border-radius: 50%;
    color: white;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.file-item-remove:hover {
    background: rgba(255, 100, 100, 0.5);
    transform: scale(1.1);
}

/* Progress Section */
.progress-section {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: fadeInUp 0.5s ease-out;
}

.progress-section.hidden {
    display: none;
}

.progress-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6ec1e3 0%, #4a9fb8 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(110, 193, 227, 0.5);
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: 0.9rem;
}

.progress-status {
    font-weight: 600;
}

.progress-percent {
    font-weight: 700;
    color: #6ec1e3;
}

.btn-cancel {
    align-self: flex-end;
    padding: 8px 16px;
    border: 2px solid rgba(255, 100, 100, 0.6);
    border-radius: 8px;
    background: rgba(255, 100, 100, 0.2);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-cancel:hover {
    background: rgba(255, 100, 100, 0.4);
    border-color: rgba(255, 100, 100, 0.8);
    transform: scale(1.05);
}

.btn-cancel:active {
    transform: scale(0.98);
}

/* Output Section */
.output-section {
    margin-bottom: 0;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.btn-copy {
    padding: 8px 16px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: #6ec1e3;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(110, 193, 227, 0.4);
}

.btn-copy:active {
    transform: scale(0.98);
}

/* History Section */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.history-title {
    color: white;
    font-size: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.btn-clear {
    padding: 8px 16px;
    border: 2px solid rgba(255, 100, 100, 0.6);
    border-radius: 8px;
    background: rgba(255, 100, 100, 0.2);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-clear:hover {
    background: rgba(255, 100, 100, 0.4);
    border-color: rgba(255, 100, 100, 0.8);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 100, 100, 0.4);
}

.btn-clear:active {
    transform: scale(0.98);
}

/* History List */
.history-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom Scrollbar */
.history-list::-webkit-scrollbar {
    width: 8px;
}

.history-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(110, 193, 227, 0.5);
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: rgba(110, 193, 227, 0.7);
}

.history-empty {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* History Item */
.history-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    animation: fadeInSlide 0.5s ease-out;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-item-type {
    font-weight: 600;
    color: #6ec1e3;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.history-item-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.history-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* MODIFIED: History delete button - Icon only, red */
.btn-delete {
    background: transparent;
    border: none;
    color: #ff6464; /* Red color for delete */
    cursor: pointer;
    padding: 4px 6px; /* Reduced padding for an icon-only look */
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.btn-delete:hover {
    background: rgba(255, 100, 100, 0.2);
    border-radius: 50%;
    transform: scale(1.2);
}


.history-item-content {
    color: white;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.history-item-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.history-item-text {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 6px;
    word-break: break-all;
    margin-bottom: 10px;
}

/* Search and Theme Controls */
.history-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    outline: none;
    border-color: #6ec1e3;
    background: rgba(255, 255, 255, 0.25);
}

/* File Output Section */
.file-output-section {
    margin-bottom: 0;
}

.file-output-section.hidden {
    display: none;
}

.btn-download-all {
    padding: 8px 16px;
    border: 2px solid rgba(110, 193, 227, 0.6);
    border-radius: 8px;
    background: rgba(110, 193, 227, 0.2);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-download-all:hover {
    background: rgba(110, 193, 227, 0.4);
    border-color: #6ec1e3;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(110, 193, 227, 0.4);
}

.btn-download-all:active {
    transform: scale(0.98);
}

/* File Output List */
.file-output-list {
    max-height: 300px;
    overflow-y: auto;
}

.processed-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    animation: fadeInSlide 0.5s ease-out;
}

.processed-file-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.processed-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.processed-file-icon {
    font-size: 1.5rem;
}

.processed-file-details {
    flex: 1;
}

.processed-file-name {
    color: white;
    font-weight: 600;
    margin-bottom: 4px;
    word-break: break-all;
}

.processed-file-meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.processed-file-actions {
    display: flex;
    gap: 8px;
}

.btn-download-single,
.btn-preview {
    background: rgba(110, 193, 227, 0.2);
    border: 1px solid rgba(110, 193, 227, 0.5);
    color: white;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-download-single:hover,
.btn-preview:hover {
    background: rgba(110, 193, 227, 0.5);
    transform: scale(1.05);
}

/* Copy Output Button */
.btn-copy-small {
    background: rgba(110, 193, 227, 0.2);
    border: 1px solid rgba(110, 193, 227, 0.5);
    color: white;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy-small:hover {
    background: rgba(110, 193, 227, 0.5);
    transform: scale(1.05);
}

/* Theme Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: rgba(110, 193, 227, 0.8);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* MODIFIED: Theme Toggle with Icons */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* NEW: Icon styles */
.theme-label-icon { 
    color: white;
    font-size: 1.1rem;
    transition: color 0.4s ease;
}

/* Set initial state for icons (Light mode is default) */
/* Sun is bright */
.theme-toggle input:not(:checked) ~ .theme-label-icon:first-child { 
    color: rgba(255, 255, 255, 0.8);
}
/* Moon is dim */
.theme-toggle input:not(:checked) ~ .theme-label-icon:last-child { 
    color: rgba(255, 255, 255, 0.5);
}

/* State when Dark mode is checked */
/* Sun is dim */
.theme-toggle input:checked ~ .theme-label-icon:first-child { 
    color: rgba(255, 255, 255, 0.5);
}
/* Moon is bright */
.theme-toggle input:checked ~ .theme-label-icon:last-child { 
    color: rgba(255, 255, 255, 0.8);
}


/* Dark Mode */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a1a 0%, #2b2b2b 100%);
}

body.dark-mode .main-card,
body.dark-mode .history-card {
    background: rgba(40, 40, 40, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .label,
body.dark-mode .history-title,
body.dark-mode .history-item-type {
    color: #b0eaff;
}

/* Dark mode specific icon adjustments for better contrast */
body.dark-mode .theme-toggle input:not(:checked) ~ .theme-label-icon:first-child {
    color: rgba(176, 234, 255, 0.5);
}
body.dark-mode .theme-toggle input:checked ~ .theme-label-icon:last-child {
    color: rgba(176, 234, 255, 0.8);
}


/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .about-card {
        padding: 25px;
    }
    
    .about-title {
        font-size: 2rem;
    }
    
    .profile-image {
        width: 120px;
        height: 120px;
    }
    
    .about-heading {
        font-size: 1.2rem;
    }
    
    .tech-list {
        justify-content: center;
    }
    
    .title {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .main-card,
    .history-card {
        padding: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .output-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .btn-copy {
        align-self: flex-end;
    }
    
    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    body {
        padding: 10px;
    }
    
    .main-card,
    .history-card {
        padding: 15px;
    }
}