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

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #00d4aa;
    --error-color: #ff6b6b;
    --warning-color: #ffd93d;
    --bg-gradient-1: #667eea;
    --bg-gradient-2: #764ba2;
    --bg-gradient-3: #f093fb;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border-color: rgba(102, 126, 234, 0.2);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.25);
    --glow: 0 0 20px rgba(102, 126, 234, 0.5);
}

/* Animated gradient background */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(-45deg, var(--bg-gradient-1), var(--bg-gradient-2), var(--bg-gradient-3), var(--primary-dark));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
}

/* Floating background elements */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

body::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.6), transparent);
    top: -100px;
    right: -100px;
    animation: float 20s ease-in-out infinite;
}

body::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.6), transparent);
    bottom: -100px;
    left: -100px;
    animation: float 25s ease-in-out infinite reverse;
}

.container {
    width: 100%;
    max-width: 950px;
    position: relative;
    z-index: 1;
}

.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeInScale 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Glassmorphism card */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow-lg),
                0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

/* Animated shine effect on card */
.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

h1 {
    color: var(--text-primary);
    font-size: 32px;
    margin-bottom: 12px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 36px;
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

input[type="text"]:hover,
input[type="password"]:hover {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 1);
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15),
                0 8px 20px rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

/* Modern button styles */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.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;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 100%;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5),
                0 0 30px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.btn-large {
    padding: 18px 36px;
    font-size: 18px;
    margin-top: 24px;
}

.header-with-logout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.upload-status {
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

/* Animated status badge */
.status-badge {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
}

.status-badge:hover::before {
    left: 100%;
}

.status-badge.submitted {
    background: linear-gradient(135deg, #00d4aa, #00b894);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.4);
}

.status-badge.pending {
    background: linear-gradient(135deg, #ffd93d, #ffb100);
    color: #2d3748;
    box-shadow: 0 4px 15px rgba(255, 217, 61, 0.4);
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

/* Modern upload items with glassmorphism */
.upload-item {
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.upload-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(102, 126, 234, 0.1),
        transparent 70%
    );
    transform: scale(0);
    transition: transform 0.5s;
}

.upload-item:hover {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.25),
                0 0 0 1px rgba(102, 126, 234, 0.1) inset;
}

.upload-item:hover::before {
    transform: scale(1);
}

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

.upload-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 700;
}

.file-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

input[type="file"] {
    display: none;
}

/* Gradient button for file upload */
.file-label {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.file-label::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.file-label:hover::after {
    width: 200px;
    height: 200px;
}

.file-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.file-name {
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-secondary);
    word-break: break-all;
    min-height: 20px;
    font-weight: 500;
}

.file-status {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
}

.file-status.uploaded {
    color: var(--success-color);
    text-shadow: 0 0 10px rgba(0, 212, 170, 0.3);
}

.file-status.error {
    color: var(--error-color);
}

.form-actions {
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Modern message boxes */
.error-message,
.success-message {
    font-size: 14px;
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 12px;
    display: none;
    font-weight: 500;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.error-message {
    color: #c92a2a;
    background: rgba(255, 107, 107, 0.15);
    border-left: 4px solid var(--error-color);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.2);
}

.success-message {
    color: #0a7562;
    background: rgba(0, 212, 170, 0.15);
    border-left: 4px solid var(--success-color);
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.2);
}

.error-message.show,
.success-message.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

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

.upload-progress {
    margin-top: 28px;
    display: none;
    position: relative;
    z-index: 1;
}

.upload-progress.show {
    display: block;
    animation: fadeInScale 0.3s ease-out;
}

/* Modern progress bar */
.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) inset;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 200% 100%;
    animation: progressGradient 2s ease infinite;
    width: 0%;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

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

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

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

/* Responsive design */
@media (max-width: 768px) {
    .card {
        padding: 32px 24px;
    }

    h1 {
        font-size: 26px;
    }

    .upload-grid {
        grid-template-columns: 1fr;
    }

    .header-with-logout {
        flex-direction: column;
        gap: 16px;
    }

    .btn-secondary {
        align-self: flex-start;
    }

    body::before,
    body::after {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 24px 20px;
        border-radius: 20px;
    }

    h1 {
        font-size: 24px;
    }

    .upload-item {
        padding: 20px;
    }

    .upload-icon {
        font-size: 48px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}
