/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #000000;
    color: #ffffff;
    overflow-x: hidden;
    cursor: auto;
}

/* Neural Canvas */
#neuralCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 170, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 0, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 255, 170, 0.03) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    z-index: -2;
}

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

/* Scanlines effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.02) 2px,
        rgba(255, 255, 255, 0.02) 4px
    );
    animation: scanlines 0.1s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes scanlines {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(4px);
    }
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Header */
.main-header {
    text-align: center;
    margin-bottom: 60px;
}

.name {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    margin: 0;
    animation: textGlow 4s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
    100% {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.6), 0 0 40px rgba(0, 136, 204, 0.4);
    }
}

.subtitle {
    font-size: 1rem;
    color: #ffffff;
    opacity: 0.7;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 20px;
}

/* Content */
.content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Sections */
.section {
    text-align: left;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffffff;
    opacity: 0.8;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

/* Time Display */
.time-display {
    font-size: 4rem;
    font-weight: 300;
    font-family: 'Courier New', monospace;
    color: #ffffff;
    text-align: center;
    margin: 20px 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.timer-running .time-display {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 30px rgba(0, 170, 255, 0.6);
    }
    100% {
        transform: scale(1);
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
}

.timer-status {
    font-size: 1rem;
    color: #ffffff;
    opacity: 0.8;
    text-align: center;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Input Section */
.input-section {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.input-group label {
    font-size: 0.8rem;
    color: #ffffff;
    opacity: 0.7;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.input-group input {
    width: 60px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 300;
    text-align: center;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.input-group input:focus {
    outline: none;
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

.input-group input::-webkit-outer-spin-button,
.input-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Button Section */
.button-section {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    min-width: 80px;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Preset Buttons */
.preset-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
    transform: translateY(-1px);
}

/* History */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-time {
    font-family: 'Courier New', monospace;
    font-weight: 300;
    color: #ffffff;
    opacity: 0.9;
}

.history-date {
    color: #ffffff;
    opacity: 0.6;
    font-size: 0.8rem;
    font-weight: 300;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 30px 15px;
    }
    
    .name {
        font-size: 2.5rem;
    }
    
    .time-display {
        font-size: 3rem;
    }
    
    .input-section {
        gap: 15px;
    }
    
    .input-group input {
        width: 50px;
        height: 35px;
        font-size: 1rem;
    }
    
    .button-section {
        gap: 10px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.8rem;
        min-width: 70px;
    }
    
    .preset-buttons {
        gap: 8px;
    }
    
    .preset-btn {
        padding: 6px 12px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 2rem;
    }
    
    .time-display {
        font-size: 2.5rem;
    }
    
    .container {
        padding: 20px 10px;
    }
    
    .input-section {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .button-section {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
    }
    
    .preset-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .preset-btn {
        width: 150px;
    }
}