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

:root {
    --primary-gold: #D4AF37;
    --gold-bright: #FFD700;
    --gold-dim: #B8860B;
    --black: #000000;
    --dark-gray: #0a0a0a;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--black);
    color: var(--primary-gold);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.8;
}

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

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

.brand {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--primary-gold);
    margin-bottom: 20px;
    text-shadow: 
        0 0 20px rgba(212, 175, 55, 0.5),
        0 0 40px rgba(212, 175, 55, 0.3);
}

.tagline {
    font-size: 1.25rem;
    color: var(--gold-dim);
    font-weight: 400;
    letter-spacing: 0.02em;
}

.timer-wrapper {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary-gold);
    border-radius: 12px;
    padding: 60px 40px;
    margin-bottom: 40px;
    box-shadow: 
        0 0 30px rgba(212, 175, 55, 0.2),
        inset 0 0 30px rgba(212, 175, 55, 0.05);
    position: relative;
}

.timer-wrapper::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, transparent, var(--primary-gold), transparent);
    border-radius: 12px;
    opacity: 0;
    animation: borderGlow 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.5; }
}

.timer-display {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    text-align: center;
    margin-bottom: 50px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    color: var(--gold-bright);
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.5);
    font-family: 'Courier New', monospace;
}

.controls-wrapper {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 16px 36px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 2px solid var(--primary-gold);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: transparent;
    color: var(--primary-gold);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    /* background: var(--primary-gold); */
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn:hover {
    color: var(--black);
    text-shadow: none;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
}

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

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

.btn-primary {
    background: var(--primary-gold);
    color: var(--black);
    border-color: var(--primary-gold);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary-gold);
}

.btn-secondary:hover {
    background: var(--primary-gold);
    color: var(--black);
}

.btn-danger {
    border-color: #ff4444;
    color: #ff4444;
}

.btn-danger:hover {
    background: #ff4444;
    color: var(--black);
    border-color: #ff4444;
}


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

.btn:disabled:hover {
    color: var(--primary-gold);
    background: transparent;
}

.btn:disabled::before {
    width: 0;
    height: 0;
}

.laps-section {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary-gold);
    border-radius: 12px;
    padding: 40px;
    display: none;
    box-shadow: 
        0 0 30px rgba(212, 175, 55, 0.2),
        inset 0 0 30px rgba(212, 175, 55, 0.05);
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 0.05em;
    color: var(--primary-gold);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.laps-wrapper {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.laps-wrapper::-webkit-scrollbar {
    width: 8px;
}

.laps-wrapper::-webkit-scrollbar-track {
    background: rgba(212, 175, 55, 0.1);
    border-radius: 10px;
}

.laps-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 10px;
}

.laps-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--gold-bright);
}

.laps-list {
    list-style: none;
}

.laps-list li {
    display: grid;
    grid-template-columns: 100px 1fr 1fr;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    align-items: center;
    transition: all 0.3s ease;
}

.laps-list li:hover {
    background: rgba(212, 175, 55, 0.05);
    padding-left: 30px;
}

.lap-number {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--gold-bright);
}

.lap-time {
    font-family: 'Courier New', monospace;
    font-variant-numeric: tabular-nums;
    font-size: 1.2rem;
    font-weight: 400;
    text-align: center;
    color: var(--primary-gold);
}

.total-time {
    font-family: 'Courier New', monospace;
    font-variant-numeric: tabular-nums;
    color: var(--gold-dim);
    text-align: right;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .controls-wrapper {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .laps-list li {
        grid-template-columns: 80px 1fr 1fr;
        padding: 15px;
        font-size: 0.9rem;
    }
}

/* Footer Styles */
.timer-footer {
    background-color: #000000;
    color: #ffffff;
    text-align: center;
    padding: 20px 15px;
    margin-top: 40px;
    position: relative;
    z-index: 10;
}

.footer-text {
    margin: 0 0 10px 0;
    font-size: 1em;
}

.footer-link {
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #FFA500;
    text-decoration: underline;
}

.footer-tagline {
    margin: 0;
    font-size: 0.9em;
    color: #cccccc;
}

.footer-ps {
    margin: 15px 0 0 0;
    font-size: 0.85em;
    color: #999999;
    font-style: italic;
}