:root {
    --primary: #FF6B35;
    --primary-dark: #E85A28;
    --secondary: #004E89;
    --accent: #F7B801;
    --bg-dark: #0A0E27;
    --bg-card: #1A1F3A;
    --text-light: #E8EAF6;
    --text-dim: #9FA8DA;
    --success: #4CAF50;
    --border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1a2e 100%);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated background particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 20s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-100px) translateX(50px); }
    50% { transform: translateY(-200px) translateX(-30px); }
    75% { transform: translateY(-100px) translateX(-80px); }
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Time Screens (Before/After Voting) */
.time-screen {
    display: none;
    animation: fadeInUp 0.6s ease-out;
}

.time-screen.active {
    display: block;
}

.time-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 600px;
    margin: 0 auto;
}

.clock-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

.time-title {
    font-family: 'Syne', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.time-message {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 40px;
    line-height: 1.6;
}

.time-message strong {
    color: var(--text-light);
    font-weight: 700;
}

.countdown-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    margin-top: 30px;
}

.countdown-label {
    display: block;
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 20px;
    font-weight: 500;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-family: 'Syne', sans-serif;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.countdown-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.countdown-label-small {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 8px;
    font-weight: 500;
}

.countdown-separator {
    font-size: 2rem;
    align-self: center;
    color: var(--text-dim);
    font-weight: 300;
}

.final-message {
    margin-top: 30px;
    padding: 20px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 12px;
    border-left: 4px solid var(--success);
}

.final-message p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Countdown Banner */
.countdown-banner {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(247, 184, 1, 0.15) 100%);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(255, 107, 53, 0); }
}

.countdown-banner-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
}

.countdown-banner-time {
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease-out;
}

h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    letter-spacing: -2px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-dim);
    font-weight: 500;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-card);
    border-radius: 10px;
    margin: 40px 0;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
}

.step-indicators {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    opacity: 0.5;
    transition: all 0.4s ease;
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.4s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.step.completed .step-number {
    background: var(--success);
    border-color: var(--success);
}

.step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dim);
}

.step.active .step-label {
    color: var(--text-light);
    font-weight: 700;
}

/* Name Registration Screen */
.name-container {
    display: none;
    animation: fadeInUp 0.6s ease-out;
}

.name-container.active {
    display: block;
}

.name-input-container {
    margin: 40px 0;
}

.name-label {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-light);
}

.name-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-light);
    font-size: 1.1rem;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.3s ease;
}

.name-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.name-input::placeholder {
    color: var(--text-dim);
    opacity: 0.7;
}

.name-error {
    color: #ff5252;
    font-size: 0.9rem;
    margin-top: 8px;
    min-height: 20px;
    font-weight: 500;
}

.question-container {
    display: none;
    animation: fadeInUp 0.6s ease-out;
}

.question-container.active {
    display: block;
}

.question-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 40px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.question-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary);
}

.question-description {
    color: var(--text-dim);
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 1.05rem;
}

.summary-description {
    margin-bottom: 40px !important;
}

.selection-info {
    background: rgba(255, 107, 53, 0.1);
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-dim);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.project-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.project-card > * {
    position: relative;
    z-index: 1;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.3);
}

.project-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(247, 184, 1, 0.1) 100%);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.4);
}

.project-card.selected::before {
    opacity: 0.1;
}

.project-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.project-name {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.3;
    flex: 1;
}

.selection-badge {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    margin-left: 12px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.project-card.selected .selection-badge {
    display: flex;
}

.project-author {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
}

.project-description {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.5;
}

.button-container {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}

.summary-button-container {
    margin-top: 40px;
}

.btn {
    padding: 16px 40px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'DM Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-light);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-dim);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.summary-container {
    display: none;
}

.summary-container.active {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

.summary-section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.summary-question-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.summary-projects {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-project {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary);
}

.summary-project-info {
    flex: 1;
}

.summary-project-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.summary-project-author {
    font-size: 0.9rem;
    color: var(--accent);
}

.summary-position {
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
}

.edit-btn {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-left: 12px;
}

.edit-btn:hover {
    background: var(--accent);
    color: var(--bg-dark);
}

.thank-you-container {
    display: none;
    text-align: center;
    padding: 60px 20px;
}

.thank-you-container.active {
    display: block;
    animation: fadeInScale 0.8s ease-out;
}

.checkmark {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success) 0%, #45a049 100%);
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(76, 175, 80, 0.4);
    animation: scaleIn 0.5s ease-out 0.3s both;
}

.checkmark svg {
    width: 60px;
    height: 60px;
    stroke: white;
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawCheck 0.8s ease-out 0.5s forwards;
}

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.thank-you-title {
    font-family: 'Syne', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.thank-you-message {
    font-size: 1.3rem;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.team-signature {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 30px;
}

@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 fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }

    h1 {
        font-size: 2.5rem;
    }

    .question-card, .time-card {
        padding: 24px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .button-container {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .countdown {
        flex-direction: column;
        gap: 10px;
    }

    .countdown-item {
        min-width: 80px;
    }

    .countdown-number {
        font-size: 2rem;
    }

    .countdown-separator {
        display: none;
    }

    .countdown-banner {
        flex-direction: column;
        gap: 8px;
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}