* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-gradient-hover: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #4c63d2 0%, #5b4c8a 50%, #c084fc 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(240, 147, 251, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.container {
    background: linear-gradient(135deg, rgba(226, 232, 240, 0.98) 0%, rgba(203, 213, 225, 0.98) 100%);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    box-shadow: var(--shadow-2xl), 0 0 0 1px rgba(148, 163, 184, 0.5);
    max-width: 900px;
    width: 100%;
    padding: 50px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.logo-link {
    display: inline-block;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.logo-link:hover {
    transform: scale(1.1) rotate(5deg);
}

.site-logo {
    width: 80px;
    height: 80px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.3));
    transition: filter 0.3s ease;
}

.logo-link:hover .site-logo {
    filter: drop-shadow(0 6px 20px rgba(102, 126, 234, 0.5));
}

header::after {
    content: '';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
    opacity: 0.3;
}

header h1 {
    font-family: 'Poppins', sans-serif;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3em;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.15em;
    font-weight: 400;
    margin-bottom: 30px;
    letter-spacing: 0.01em;
}

.expiry-notice-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
    border-radius: 20px;
    padding: 22px 35px;
    margin: 30px auto;
    max-width: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: gentlePulse 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.expiry-notice-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 3s infinite;
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(245, 158, 11, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
    50% {
        transform: scale(1.01);
        box-shadow: 0 12px 35px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.expiry-icon {
    font-size: 2.2em;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.expiry-text {
    color: #92400e;
    font-size: 1.35em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Poppins', sans-serif;
    position: relative;
    z-index: 1;
}

.expiry-notice-box.admin-mode {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #10b981;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: none;
}

.expiry-notice-box.admin-mode .expiry-text {
    color: #065f46;
}

.admin-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.admin-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.95em;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    letter-spacing: 0.5px;
}

.logout-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9em;
    padding: 10px 20px;
    border: 2px solid #667eea;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    background: rgba(102, 126, 234, 0.05);
}

.logout-link:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.upload-area {
    border: 2px dashed #a5b4fc;
    border-radius: 14px;
    padding: 15px 15px;
    text-align: center;
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s;
}

.upload-area:hover::before {
    left: 100%;
}

.upload-area:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
}

.upload-area.dragover {
    border-color: #764ba2;
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    transform: scale(1.02) translateY(-4px);
    box-shadow: 0 25px 50px rgba(118, 75, 162, 0.25);
}

.upload-icon {
    font-size: 1.8em;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.upload-area h2 {
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 1em;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.upload-area p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.85em;
}

#fileInput {
    display: none;
}

.upload-button button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 28px;
    font-size: 0.95em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.upload-button button::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;
}

.upload-button button:hover::before {
    width: 300px;
    height: 300px;
}

.upload-button button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.45);
    background: var(--primary-gradient-hover);
}

.upload-button button:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.35);
}

.upload-button button span {
    position: relative;
    z-index: 1;
}

.file-list {
    margin-top: 35px;
}

.file-item {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    padding: 18px 22px;
    border-radius: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid;
    border-image: var(--primary-gradient) 1;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.file-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.file-name {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
    font-size: 0.95em;
}

.file-size {
    color: var(--text-secondary);
    margin-left: 15px;
    font-size: 0.9em;
    font-weight: 500;
}

.progress-container {
    margin-top: 35px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.progress-text {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95em;
}

.result-container {
    margin-top: 35px;
    padding: 28px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 20px;
    border: 2px solid #10b981;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
}

.result-container h3 {
    color: #059669;
    margin-bottom: 20px;
    font-size: 1.4em;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-container h3::before {
    content: '✓';
    background: #10b981;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 700;
}

.result-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-link {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    padding: 18px 22px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.result-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #667eea;
}

.result-link > div {
    flex: 1;
    margin-right: 15px;
}

.result-link a {
    color: #667eea;
    text-decoration: none;
    word-break: break-all;
    font-weight: 500;
    transition: color 0.2s ease;
}

.result-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.copy-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: var(--primary-gradient-hover);
}

.copy-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

footer {
    text-align: center;
    margin-top: 50px;
    color: var(--text-secondary);
    font-size: 0.9em;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    font-weight: 400;
}

.notification {
    position: fixed;
    top: 30px;
    right: 30px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    animation: slideIn 0.3s ease-out, slideOut 0.3s ease-in 2.7s;
    font-weight: 500;
    font-size: 0.95em;
    min-width: 250px;
}

.notification.show {
    display: flex;
}

.notification-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1em;
    flex-shrink: 0;
}

.notification-text {
    flex: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@media (max-width: 600px) {
    .notification {
        top: 20px;
        right: 20px;
        left: 20px;
        min-width: auto;
    }

    @keyframes slideIn {
        from {
            transform: translateY(-100px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    @keyframes slideOut {
        from {
            transform: translateY(0);
            opacity: 1;
        }
        to {
            transform: translateY(-100px);
            opacity: 0;
        }
    }

    .container {
        padding: 30px 20px;
        border-radius: 24px;
    }

    .site-logo {
        width: 60px;
        height: 60px;
    }

    header h1 {
        font-size: 2.2em;
    }

    .expiry-notice-box {
        padding: 18px 22px;
        flex-direction: column;
        gap: 12px;
    }

    .expiry-icon {
        font-size: 1.8em;
    }

    .expiry-text {
        font-size: 1.1em;
        text-align: center;
    }

    .upload-area {
        padding: 12px 12px;
    }

    .upload-icon {
        font-size: 1.6em;
    }

    .file-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .file-size {
        margin-left: 0;
        margin-top: 8px;
    }

    .result-link {
        flex-direction: column;
        gap: 12px;
    }

    .result-link > div {
        margin-right: 0;
        width: 100%;
    }

    .copy-btn {
        width: 100%;
    }
}
