* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #020617;
    color: #F9FAFB;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    box-sizing: border-box;
    background: radial-gradient(circle at top, rgba(37,99,235,0.18) 0, transparent 55%), #020617;
    gap: 16px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 1400px;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px;
    background: #020617;
    box-shadow: 0 18px 45px rgba(15,23,42,0.9);
    box-sizing: border-box;
}

.video-element {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 160px);
    object-fit: contain;
    background-color: #000000;
    display: block;
    border-radius: 16px;
    box-sizing: border-box;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    pointer-events: none;
    padding: 16px;
    box-sizing: border-box;
}

.overlay-top-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    pointer-events: none;
}

.brand-logo-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #E5E7EB;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15,23,42,0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(148,163,184,0.35);
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.brand-logo-icon {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #38BDF8;
    box-shadow: 0 0 0 4px rgba(56,189,248,0.35);
}

.status-pill {
    font-size: 13px;
    font-weight: 500;
    color: #E5E7EB;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15,23,42,0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(148,163,184,0.35);
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22C55E;
    box-shadow: 0 0 0 4px rgba(34,197,94,0.32);
}

.overlay-bottom-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    pointer-events: none;
    margin-top: auto;
}

.video-caption {
    max-width: 70%;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    color: #E5E7EB;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15,23,42,0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(148,163,184,0.35);
    pointer-events: auto;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.progress-info {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 400;
    color: #CBD5F5;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15,23,42,0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(148,163,184,0.35);
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.skip-button {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1100;
    padding: 10px 16px;
    min-height: 40px;
    background: #2563EB;
    color: #F9FAFB;
    border: 1px solid #1D4ED8;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(15,23,42,0.6);
    transition: all 0.2s ease;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    outline: none;
}

.skip-button-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.skip-button:hover {
    background: #1D4ED8;
    transform: translateY(-2px);
    box-shadow: 0 14px 35px rgba(15,23,42,0.8);
}

.skip-button:focus-visible {
    outline: 2px solid #F97316;
    outline-offset: 3px;
    box-shadow: 0 0 0 3px rgba(249,115,22,0.6);
}

.skip-button:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(15,23,42,0.7);
}

.primary-button {
    padding: 12px 24px;
    min-height: 44px;
    background: #2563EB;
    color: #F9FAFB;
    border: 1px solid #1D4ED8;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(15,23,42,0.7);
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.primary-button:hover {
    background: #1D4ED8;
    border-color: #1D4ED8;
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(15,23,42,0.85);
}

.primary-button:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(15,23,42,0.8);
}

.primary-button:focus-visible {
    outline: 2px solid #F97316;
    outline-offset: 3px;
    box-shadow: 0 0 0 3px rgba(249,115,22,0.6);
}

.primary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.secondary-button {
    padding: 10px 20px;
    min-height: 40px;
    background: transparent;
    color: #E5E7EB;
    border: 1px solid #4B5563;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 0 0 rgba(0,0,0,0);
    transition: all 0.2s ease;
    text-decoration: none;
}

.secondary-button:hover {
    background: rgba(31,41,55,0.85);
    border-color: #6B7280;
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(15,23,42,0.7);
}

.secondary-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(15,23,42,0.6);
}

.secondary-button:focus-visible {
    outline: 2px solid #F97316;
    outline-offset: 3px;
    box-shadow: 0 0 0 3px rgba(249,115,22,0.6);
}

.secondary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.input-field {
    width: 100%;
    padding: 10px 12px;
    min-height: 40px;
    background: rgba(15,23,42,0.9);
    color: #F9FAFB;
    border: 1px solid #4B5563;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 0 0 0 rgba(0,0,0,0);
}

.input-field::placeholder {
    color: #9CA3AF;
}

.input-field:hover {
    border-color: #6B7280;
    background: rgba(15,23,42,0.95);
}

.input-field:focus-visible {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.45);
}

.input-field:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.text-area {
    width: 100%;
    min-height: 120px;
    padding: 10px 12px;
    background: rgba(15,23,42,0.9);
    color: #F9FAFB;
    border: 1px solid #4B5563;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    resize: vertical;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 0 0 0 rgba(0,0,0,0);
}

.text-area::placeholder {
    color: #9CA3AF;
}

.text-area:hover {
    border-color: #6B7280;
    background: rgba(15,23,42,0.95);
}

.text-area:focus-visible {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.45);
}

.text-area:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 24px;
    align-items: stretch;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;
}

.card {
    display: flex;
    flex-direction: column;
    min-height: 180px;
    padding: 16px;
    background: rgba(15,23,42,0.96);
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.35);
    box-shadow: 0 10px 25px rgba(15,23,42,0.7);
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(15,23,42,0.9);
    border-color: rgba(148,163,184,0.8);
}

.card:active {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(15,23,42,0.85);
}

.card-footer {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.main-heading {
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #F9FAFB;
    letter-spacing: 0.02em;
}

.sub-heading {
    font-size: 22px;
    line-height: 1.3;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #E5E7EB;
}

.section-heading {
    font-size: 18px;
    line-height: 1.4;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #E5E7EB;
}

.body-text {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.link {
    color: #93C5FD;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.15s ease, text-decoration-color 0.15s ease, transform 0.15s ease;
}

.link:hover {
    color: #BFDBFE;
    transform: translateY(-1px);
}

.link:focus-visible {
    outline: 2px solid #F97316;
    outline-offset: 2px;
}

.link:active {
    transform: translateY(0);
}

.top-nav {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: linear-gradient(to bottom, rgba(2,6,23,0.96), rgba(2,6,23,0.85), transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-sizing: border-box;
}

.top-nav-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.top-nav-right {
    width: 80px;
}

.site-footer {
    margin-top: 16px;
    padding: 12px 16px;
    width: 100%;
    box-sizing: border-box;
    border-top: 1px solid rgba(148,163,184,0.35);
    background: rgba(2,6,23,0.96);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    line-height: 1.5;
    color: #9CA3AF;
    z-index: 800;
    flex-shrink: 0;
}

.footer-left {
    font-size: 12px;
    line-height: 1.5;
    color: #9CA3AF;
}

.footer-right {
    font-size: 12px;
    line-height: 1.5;
    color: #6B7280;
    text-align: right;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 3px solid rgba(148,163,184,0.35);
    border-top-color: #F97316;
    animation: spin 1s linear infinite;
    box-sizing: border-box;
}

.skeleton-placeholder {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(30,64,175,0.2) 0%, rgba(30,64,175,0.45) 50%, rgba(30,64,175,0.2) 100%);
    background-size: 200% 100%;
    animation: pulse 1.6s ease-in-out infinite;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-backdrop[hidden] {
    display: none;
}

.modal-backdrop-visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-dialog {
    width: 100%;
    max-width: 480px;
    margin: 16px;
    border-radius: 16px;
    background: rgba(15,23,42,0.98);
    border: 1px solid rgba(148,163,184,0.4);
    box-shadow: 0 24px 60px rgba(15,23,42,0.95);
    padding: 20px 20px 16px 20px;
    box-sizing: border-box;
    transform: translateY(16px);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.modal-dialog-visible {
    opacity: 1;
    transform: translateY(0);
}

.accessibility-notice-text {
    font-size: 14px;
    line-height: 1.6;
    color: #E5E7EB;
    margin: 0 0 8px 0;
}

.countdown-highlight {
    font-weight: 600;
    color: #F97316;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
    0% { opacity: 0; transform: translateY(24px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes subtleScale {
    0% { transform: scale(1); }
    100% { transform: scale(1.02); }
}

@media (max-width: 640px) {
    .overlay-bottom-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .video-caption {
        max-width: 100%;
        white-space: normal;
    }

    .top-nav {
        padding-inline: 12px;
    }

    .app-container {
        padding: 12px;
    }
}
