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

/* Detroit Lions Colors */
:root {
    --lions-blue: #0076B6;
    --lions-blue-light: #00a0f0;
    --lions-blue-dark: #004d80;
    --lions-silver: #B0B7BC;
    --lions-silver-light: #d4d9dd;
    --lions-silver-dark: #8a9299;
}

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

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.9;
    }
}

@keyframes glow {
    0%, 100% {
        text-shadow:
            0 0 20px var(--lions-blue),
            0 0 40px var(--lions-blue),
            0 0 60px var(--lions-blue),
            0 0 80px var(--lions-blue-light);
        filter: brightness(1);
    }
    50% {
        text-shadow:
            0 0 30px var(--lions-blue-light),
            0 0 60px var(--lions-blue),
            0 0 90px var(--lions-blue),
            0 0 120px var(--lions-blue-light),
            0 0 150px var(--lions-silver);
        filter: brightness(1.2);
    }
}

@keyframes borderGlow {
    0%, 100% {
        box-shadow:
            0 0 5px var(--lions-blue),
            0 0 10px var(--lions-blue),
            0 0 20px rgba(0, 118, 182, 0.5),
            inset 0 0 10px rgba(0, 118, 182, 0.1);
    }
    50% {
        box-shadow:
            0 0 10px var(--lions-blue-light),
            0 0 20px var(--lions-blue),
            0 0 40px rgba(0, 118, 182, 0.7),
            0 0 60px rgba(176, 183, 188, 0.3),
            inset 0 0 20px rgba(0, 118, 182, 0.2);
    }
}

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

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes colorShift {
    0%, 100% {
        filter: hue-rotate(0deg);
    }
    50% {
        filter: hue-rotate(15deg);
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(
        -45deg,
        #000000,
        #000000,
        #050a10,
        #000000,
        #001525,
        #000000,
        #000000,
        #0a1520,
        #000000,
        #000000,
        #001020,
        #000000
    );
    background-size: 400% 400%;
    animation: gradientFlow 25s ease infinite;
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
    position: relative;
}

/* Animated particles overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(0, 118, 182, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 160, 240, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 118, 182, 0.2) 0%, transparent 30%),
        radial-gradient(circle at 90% 90%, rgba(176, 183, 188, 0.08) 0%, transparent 40%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* Floating orbs */
body::after {
    content: '';
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 118, 182, 0.3) 0%, rgba(0, 76, 130, 0.15) 50%, transparent 70%);
    border-radius: 50%;
    top: -150px;
    right: -150px;
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: var(--lions-blue-light);
    text-shadow:
        0 0 8px rgba(0, 160, 240, 0.6),
        0 0 20px rgba(0, 118, 182, 0.4),
        0 0 40px rgba(0, 118, 182, 0.2);
}

.subtitle {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 500;
    color: var(--lions-silver);
    text-shadow:
        0 0 8px rgba(176, 183, 188, 0.4),
        0 0 20px rgba(0, 118, 182, 0.3);
}

.timer-section {
    background: linear-gradient(
        135deg,
        rgba(0, 118, 182, 0.15) 0%,
        rgba(176, 183, 188, 0.05) 50%,
        rgba(0, 118, 182, 0.15) 100%
    );
    border-radius: 20px;
    padding: 50px 40px;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid rgba(0, 118, 182, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* Sweeping light effect on timer section */
.timer-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(176, 183, 188, 0.1) 50%,
        transparent 60%
    );
    animation: rotate 8s linear infinite;
    pointer-events: none;
}

.timer-display {
    font-size: 4.5rem;
    font-weight: 800;
    font-family: 'SF Mono', 'Fira Code', monospace;
    letter-spacing: 4px;
    margin-bottom: 30px;
    color: var(--lions-blue-light);
    text-shadow:
        0 0 8px rgba(0, 160, 240, 0.6),
        0 0 20px rgba(0, 118, 182, 0.4),
        0 0 40px rgba(0, 118, 182, 0.2);
    position: relative;
    z-index: 1;
}

.timer-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.btn {
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.btn::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 ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn:disabled::before {
    display: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--lions-blue) 0%, var(--lions-blue-light) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 118, 182, 0.5);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 6px 25px rgba(0, 118, 182, 0.7),
        0 0 30px rgba(0, 118, 182, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--lions-silver-dark) 0%, var(--lions-silver) 100%);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(176, 183, 188, 0.3);
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 6px 25px rgba(176, 183, 188, 0.5),
        0 0 30px rgba(176, 183, 188, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 6px 25px rgba(220, 20, 60, 0.5),
        0 0 30px rgba(220, 20, 60, 0.3);
}

.milestone-section {
    background: linear-gradient(
        135deg,
        rgba(176, 183, 188, 0.15) 0%,
        rgba(0, 118, 182, 0.1) 100%
    );
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid rgba(176, 183, 188, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.milestone-section:hover {
    border-color: var(--lions-blue);
    box-shadow: 0 0 30px rgba(0, 118, 182, 0.3);
}

.milestone-section h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: var(--lions-silver-light);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.milestone-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.milestone-form input {
    flex: 1;
    min-width: 200px;
    padding: 14px 18px;
    font-size: 1rem;
    border: 2px solid rgba(0, 118, 182, 0.3);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
}

.milestone-form input::placeholder {
    color: var(--lions-silver-dark);
}

.milestone-form input:focus {
    border-color: var(--lions-blue-light);
    box-shadow:
        0 0 20px rgba(0, 118, 182, 0.4),
        inset 0 0 10px rgba(0, 118, 182, 0.1);
}

.milestones-list-section {
    background: linear-gradient(
        135deg,
        rgba(0, 118, 182, 0.15) 0%,
        rgba(176, 183, 188, 0.1) 100%
    );
    border-radius: 20px;
    padding: 30px;
    border: 2px solid rgba(0, 118, 182, 0.3);
    backdrop-filter: blur(10px);
}

.milestones-list-section h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: var(--lions-silver-light);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.milestones-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empty-state {
    color: var(--lions-silver);
    text-align: center;
    padding: 30px;
    font-style: italic;
    animation: pulse 3s ease-in-out infinite;
}

.milestone-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: linear-gradient(
        90deg,
        rgba(0, 118, 182, 0.2) 0%,
        rgba(176, 183, 188, 0.1) 100%
    );
    border-radius: 12px;
    border-left: 4px solid var(--lions-blue);
    transition: all 0.3s ease;
    animation: pulse 4s ease-in-out infinite;
}

.milestone-item:nth-child(odd) {
    animation-delay: 0.5s;
}

.milestone-item:hover {
    transform: translateX(10px);
    background: linear-gradient(
        90deg,
        rgba(0, 118, 182, 0.3) 0%,
        rgba(176, 183, 188, 0.2) 100%
    );
    box-shadow:
        0 0 20px rgba(0, 118, 182, 0.3),
        -4px 0 20px rgba(0, 118, 182, 0.5);
}

.milestone-time {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--lions-blue-light);
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(0, 160, 240, 0.5);
}

.milestone-label {
    flex: 1;
    color: var(--lions-silver-light);
    word-break: break-word;
}

.milestone-delete {
    background: none;
    border: none;
    color: var(--lions-silver-dark);
    cursor: pointer;
    padding: 6px 10px;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.milestone-delete:hover {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.2);
    transform: scale(1.2) rotate(90deg);
    text-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
}

/* Extra floating elements for more visual interest */
@keyframes floatAround {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(50px, -30px) rotate(90deg);
    }
    50% {
        transform: translate(20px, 40px) rotate(180deg);
    }
    75% {
        transform: translate(-30px, 20px) rotate(270deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* Password Modal Styles */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes shake {
    0%, 100% { transform: translate(-50%, -50%) translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-50%, -50%) translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translate(-50%, -50%) translateX(5px); }
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    animation: modalFadeIn 0.3s ease;
}

.modal-overlay.active {
    display: block;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(
        135deg,
        rgba(0, 26, 46, 0.95) 0%,
        rgba(0, 77, 128, 0.9) 100%
    );
    border: 2px solid var(--lions-blue);
    border-radius: 20px;
    padding: 0;
    width: 90%;
    max-width: 400px;
    box-shadow:
        0 0 30px rgba(0, 118, 182, 0.5),
        0 0 60px rgba(0, 118, 182, 0.3),
        inset 0 0 30px rgba(0, 118, 182, 0.1);
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
}

.modal.shake {
    animation: shake 0.5s ease;
}

.modal-header {
    background: linear-gradient(
        90deg,
        var(--lions-blue-dark) 0%,
        var(--lions-blue) 50%,
        var(--lions-blue-dark) 100%
    );
    padding: 20px 25px;
    border-bottom: 1px solid rgba(176, 183, 188, 0.2);
}

.modal-header h3 {
    margin: 0;
    color: var(--lions-silver-light);
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    text-shadow: 0 0 10px rgba(176, 183, 188, 0.5);
}

.modal-body {
    padding: 25px;
}

.modal-body p {
    color: var(--lions-silver);
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
}

.modal-body input {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: 2px solid rgba(0, 118, 182, 0.5);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 2px;
}

.modal-body input::placeholder {
    color: var(--lions-silver-dark);
    letter-spacing: 1px;
}

.modal-body input:focus {
    border-color: var(--lions-blue-light);
    box-shadow:
        0 0 20px rgba(0, 118, 182, 0.4),
        inset 0 0 10px rgba(0, 118, 182, 0.1);
}

.modal-body input.error {
    border-color: #ff4757;
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.4);
}

.password-error {
    color: #ff4757 !important;
    font-size: 0.9rem;
    margin-top: 12px !important;
    margin-bottom: 0 !important;
    min-height: 20px;
    text-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
}

.modal-actions {
    display: flex;
    gap: 12px;
    padding: 20px 25px 25px;
    justify-content: center;
}

.modal-actions .btn {
    flex: 1;
    max-width: 150px;
}

/* Modal field styles */
.modal-field {
    margin-bottom: 15px;
}

.modal-field:last-of-type {
    margin-bottom: 0;
}

.modal-field.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

/* Security question display */
.security-question-display {
    background: rgba(0, 118, 182, 0.2);
    border: 1px solid var(--lions-blue);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    color: var(--lions-silver-light);
    font-style: italic;
    text-align: center;
}

/* Forgot password link */
.forgot-password-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: var(--lions-blue-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.forgot-password-link:hover {
    color: var(--lions-silver-light);
    text-shadow: 0 0 10px rgba(0, 160, 240, 0.5);
}

/* Fireworks Styles */
.fireworks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.firework-rocket {
    position: absolute;
    width: 4px;
    height: 12px;
    border-radius: 50% 50% 0 0;
    will-change: transform, opacity;
}

.firework-spark {
    position: absolute;
    border-radius: 50%;
    will-change: transform, opacity;
}

.firework-trail {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    opacity: 0.6;
    will-change: transform, opacity;
}

@media (max-width: 480px) {
    .timer-display {
        font-size: 2.8rem;
    }

    header h1 {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .container {
        padding: 20px 16px;
    }

    .timer-section,
    .milestone-section,
    .milestones-list-section {
        padding: 20px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}
