/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0b0f1a;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #5b9bf5;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #89b8ff;
    text-decoration: underline;
}

/* ===== Header ===== */
.site-header {
    background: linear-gradient(135deg, #0d1b3e 0%, #142952 50%, #0d4093 100%);
    border-bottom: 1px solid rgba(93, 155, 245, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    font-size: 1.6rem;
    color: #6ee7b7;
    line-height: 1;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* ===== Main ===== */
.main-content {
    flex: 1;
    padding: 30px 20px 50px;
}

.container {
    max-width: 960px;
    margin: 0 auto;
}

/* ===== Player Section ===== */
.player-section {
    margin-bottom: 40px;
}

.animation-panel {
    background: #1a1f2e;
    border-radius: 0px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45),
                0 0 0 1px rgba(93, 155, 245, 0.08);
}

.panel-header {
    padding: 18px 24px;
    background: linear-gradient(135deg, #0d4093, #1a5bc4);
    text-align: center;
}

.panel-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2px;
}

.panel-header p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}

/* Canvas — maintains ~694:655 aspect ratio ≈ 1.0595:1 */
.canvas-wrapper {
    background: #111520;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.canvas-container {
    position: relative;
    width: 100%;
    max-width: 694px;
    padding-bottom: min(94.38%, 655px); /* 655/694 ≈ 94.38% */
    background: #1c1c1c;
}

canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    display: block;
}

/* ===== Control Bar ===== */
.control-bar {
    padding: 14px 18px;
    background: #15192a;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.play-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d4093, #1a5bc4);
    cursor: pointer;
    position: relative;
    transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(13, 64, 147, 0.4);
}

.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(13, 64, 147, 0.6);
}

.play-btn:active {
    transform: scale(0.96);
}

.play-btn::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    background: white;
    transform: translate(-50%, -50%);
    transition: all 0.2s ease;
}

.play-btn:not(.paused)::before {
    width: 0;
    height: 0;
    background: transparent;
    border: 9px solid transparent;
    border-left: 14px solid white;
    transform: translate(-35%, -50%);
}

.progress-container {
    flex: 1;
    min-width: 80px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: height 0.15s;
}

.progress-container:hover {
    height: 12px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0d4093, #5b9bf5);
    width: 0;
    border-radius: 4px;
    transition: width 0.1s;
}

.date-picker {
    padding: 8px 14px;
    border: 1px solid rgba(93, 155, 245, 0.3);
    border-radius: 20px;
    background: rgba(13, 64, 147, 0.15);
    color: #d0d8e8;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.date-picker:focus {
    border-color: #5b9bf5;
    box-shadow: 0 0 0 3px rgba(91, 155, 245, 0.15);
}

.date-picker::-webkit-calendar-picker-indicator {
    filter: invert(0.75) sepia(0.3) saturate(3) hue-rotate(190deg);
    cursor: pointer;
}

.error-message {
    color: #ff6b6b;
    font-size: 0.85rem;
    font-weight: 500;
    display: none;
    white-space: nowrap;
}

/* ===== Usage Hint ===== */
.usage-hint {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    padding: 16px 20px;
    background: rgba(93, 155, 245, 0.06);
    border: 1px solid rgba(93, 155, 245, 0.12);
    border-radius: 10px;
}

.hint-icon {
    font-size: 1.3rem;
    color: #5b9bf5;
    flex-shrink: 0;
    line-height: 1.5;
}

.usage-hint p {
    font-size: 0.88rem;
    color: #9aa5b8;
    line-height: 1.65;
}

/* ===== About Section ===== */
.about-section {
    margin-bottom: 35px;
}

.about-card {
    background: #13172480;
    border: 1px solid rgba(93, 155, 245, 0.1);
    border-radius: 14px;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.about-header {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(93, 155, 245, 0.08);
}

.about-header h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
}

.about-body {
    padding: 22px 24px 26px;
}

.about-body > p {
    font-size: 0.92rem;
    color: #b0b8c9;
    line-height: 1.75;
    margin-bottom: 24px;
}

.references {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 18px;
}

.references h4 {
    font-size: 0.92rem;
    font-weight: 600;
    color: #8fa3c0;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.references ol {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.references li {
    font-size: 0.82rem;
    color: #7a889e;
    line-height: 1.7;
}

.references em {
    color: #99a8be;
}

/* ===== Disclaimer ===== */
.disclaimer {
    padding: 16px 22px;
    background: rgba(255, 107, 107, 0.06);
    border: 1px solid rgba(255, 107, 107, 0.15);
    border-radius: 10px;
    font-size: 0.88rem;
    color: #d4a0a0;
    line-height: 1.6;
}

.disclaimer strong {
    color: #ff6b6b;
}

/* ===== Footer ===== */
.site-footer {
    background: #0a0e18;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 28px 20px;
    text-align: center;
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-org {
    font-size: 0.88rem;
    font-weight: 500;
    color: #9aa5b8;
}

.footer-contact a {
    font-size: 0.82rem;
    color: #5b9bf5;
}

.footer-copy {
    font-size: 0.75rem;
    color: #4a5568;
    margin-top: 4px;
}

/* ======================================================
   Responsive
   ====================================================== */

/* Tablets (portrait and small laptops) */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .header-inner {
        padding: 12px 16px;
    }

    .brand-title {
        font-size: 1.1rem;
    }

    .main-content {
        padding: 20px 14px 40px;
    }

    .panel-header {
        padding: 14px 18px;
    }

    .panel-header h2 {
        font-size: 1.15rem;
    }

    .control-bar {
        padding: 12px 14px;
        gap: 10px;
    }

    .play-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }

    .date-picker {
        padding: 7px 12px;
        font-size: 0.85rem;
    }

    .about-body {
        padding: 18px 18px 22px;
    }

    .usage-hint {
        padding: 14px 16px;
    }
}

/* Phones */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .header-inner {
        padding: 10px 14px;
    }

    .brand-icon {
        font-size: 1.3rem;
    }

    .brand-title {
        font-size: 1rem;
    }

    .brand-subtitle {
        font-size: 0.7rem;
    }

    .main-content {
        padding: 14px 10px 30px;
    }

    .animation-panel {
        border-radius: 0px;
    }

    .panel-header {
        padding: 12px 14px;
    }

    .panel-header h2 {
        font-size: 1.05rem;
    }

    .panel-header p {
        font-size: 0.75rem;
    }

    .control-bar {
        padding: 10px 12px;
        gap: 8px;
        flex-wrap: wrap;
    }

    /* Stack date picker on its own row on small screens */
    .control-bar .date-picker {
        order: 4;
        flex: 1 1 100%;
        text-align: center;
        border-radius: 8px;
    }

    .control-bar .error-message {
        order: 3;
    }

    .play-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .play-btn::before {
        width: 12px;
        height: 12px;
    }

    .play-btn:not(.paused)::before {
        border-width: 7px;
        border-left-width: 11px;
    }

    .usage-hint {
        padding: 12px 14px;
        gap: 10px;
    }

    .usage-hint p {
        font-size: 0.82rem;
    }

    .about-header {
        padding: 14px 16px;
    }

    .about-body {
        padding: 16px 16px 20px;
    }

    .about-body > p {
        font-size: 0.86rem;
    }

    .references li {
        font-size: 0.78rem;
    }

    .disclaimer {
        padding: 14px 16px;
        font-size: 0.82rem;
    }

    .footer-org {
        font-size: 0.8rem;
    }

    .footer-contact a {
        font-size: 0.78rem;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .container {
        max-width: 1000px;
    }
}