@charset "UTF-8";

/* --- Global Styles --- */
:root {
    --primary-color: #00aaff; /* Bright cyan for highlights */
    --background-color: #0a0a1a; /* Deep dark blue */
    --text-color: #e0e0e0; /* Light grey for text */
    --glow-color: rgba(0, 170, 255, 0.8);
    --scanline-bg: #000;
    --scanline-color: rgba(0, 255, 255, 0.05);
    --font-family: 'Courier New', Courier, monospace;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    overflow: hidden; /* Hide scrollbars to keep the immersive feel */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: 
        radial-gradient(ellipse at center, rgba(10, 20, 40, 0.8), transparent 70%),
        repeating-linear-gradient(0deg, var(--scanline-color) 0, var(--scanline-color) 1px, transparent 1px, transparent 3px);
    background-size: 100% 100%, 100% 3px;
}

/* --- Scanline Animation --- */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(20, 20, 30, 0), rgba(20, 20, 30, 0.8) 50%, rgba(20, 20, 30, 0));
    animation: scan 7s linear infinite;
    opacity: 0.3;
}

@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* --- Main Container --- */
.container {
    width: 90%;
    max-width: 1000px;
    padding: 2rem;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    background: rgba(10, 10, 26, 0.6);
    box-shadow: 0 0 25px var(--glow-color);
    backdrop-filter: blur(5px);
    z-index: 1;
    animation: fadeIn 2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* --- Header --- */
header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 1rem;
}

#main-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--glow-color), 0 0 20px var(--glow-color);
    animation: flicker 3s infinite alternate;
}

/* --- Calendar Display --- */
.calendar-display {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 170, 255, 0.3);
    border-radius: 6px;
    backdrop-filter: blur(3px);
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.1);
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.calendar-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 170, 255, 0.3);
    border-color: var(--primary-color);
}

.calendar-display:hover::after {
    
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--primary-color);
    opacity: 0.8;
    white-space: nowrap;
}

.date-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.date-main {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 8px var(--glow-color);
    font-family: var(--font-family);
    letter-spacing: 1px;
}

.date-details {
    font-size: 1rem;
    color: var(--text-color);
    font-family: var(--font-family);
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.lunar-info {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-family);
    letter-spacing: 0.5px;
    margin-top: 0.2rem;
}

.lunar-label {
    color: var(--primary-color);
    opacity: 0.8;
}

.date-details .separator,
.lunar-info .separator {
    margin: 0 0.5rem;
    color: var(--primary-color);
    opacity: 0.6;
}

.date-details span:not(.separator),
.lunar-info span:not(.separator):not(.lunar-label) {
    color: var(--text-color);
    text-shadow: 0 0 3px rgba(0, 170, 255, 0.3);
}

/* --- Typing Cursor --- */
#main-title::after {
    content: '_';
    animation: blink 1s step-end infinite;
    margin-left: 5px;
}

@keyframes blink {
    50% { opacity: 0; }
}

@keyframes flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow:
            0 0 4px var(--primary-color),
            0 0 10px var(--primary-color),
            0 0 18px var(--primary-color),
            0 0 38px var(--glow-color),
            0 0 70px var(--glow-color);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

/* --- Toolbox Grid --- */
#toolbox {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-left: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

.category:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 170, 255, 0.2);
}

.category-title {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-transform: uppercase;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0.8rem;
}

.category-list a {
    color: var(--text-color);
    text-decoration: none;
    display: inline-block;
    position: relative;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.category-list a::before {
    content: '>';
    margin-right: 10px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.category-list a:hover,
.category-list a:focus {
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--glow-color);
}

.category-list a:hover::before {
    color: var(--text-color);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 1.5rem;
    }

    #main-title {
        font-size: 2rem;
    }

    #toolbox {
        grid-template-columns: 1fr;
    }

    .calendar-display {
        margin-top: 1rem;
        padding: 0.8rem;
    }

    .date-main {
        font-size: 1.4rem;
    }

    .date-details,
    .lunar-info {
        font-size: 0.9rem;
    }

    .calendar-display:hover::after {
        font-size: 0.7rem;
        bottom: -20px;
    }
}
