/* Version: V1.0 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

:root {
    --danger: #ff3e3e;
    --danger-hover: #e63535;
    --dark: #0a0a0a;
    --dark-accent: #151515;
    --light: #f5f5f7;
    --gray: #86868b;
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --translate-bg: rgba(18, 18, 20, 0.84);
    --translate-bg-hover: rgba(34, 34, 38, 0.92);
    --translate-border: rgba(255, 88, 88, 0.62);
    --translate-text: #f7f8fa;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.pi-topbar {
    display: none;
    background: rgba(46, 125, 50, 0.14);
    border-bottom: 1px solid rgba(129, 199, 132, 0.35);
}

.pi-topbar.visible {
    display: block;
}

.pi-topbar-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 10px 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.pi-topbar-badge {
    color: #9be0a0;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pi-topbar-link {
    color: #c8facc;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.pi-topbar-link:hover {
    color: #ffffff;
}

.pi-topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pi-topbar-btn {
    background: transparent;
    border: 1px solid rgba(200, 250, 204, 0.45);
    color: #c8facc;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.pi-topbar-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.7);
}

.container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 64px;
}

@media (max-width: 768px) {
    .container { padding: 0 28px; }
    .pi-topbar-inner { padding: 10px 28px; }
}

/* Header */
header {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0;
    height: auto;
    border-bottom: 1px solid var(--border);
    overflow: visible;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 0;
    height: 74px;
    padding: 0 64px;
    overflow: visible;
}

.super-header-warning {
    background: rgba(10, 10, 10, 0.9);
    border-bottom: 1px solid var(--border);
}

.super-header-warning-inner {
    display: block;
    padding: 0;
}

.navbar-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    height: 100%;
}

.navbar-left {
    display: flex;
    align-items: stretch;
    height: 100%;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 auto;
}

.navbar-right {
    display: flex;
    align-items: center;
    height: auto;
    min-width: 0;
    flex: 0 0 auto;
}

.logo-header {
    display: block;
    width: auto;
    height: 100%;
    max-height: 100%;
    margin: 0;
    padding: 0;
}

.logo-left-margin {
    margin-left: 12px;
}

.navbar-translate {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    position: relative;
}

.language-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--light);
    border-radius: 999px;
    padding: 8px 10px;
    cursor: pointer;
}

.language-toggle:hover {
    border-color: rgba(255, 120, 120, 0.55);
}

.language-toggle-icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    width: 16px;
    height: 14px;
}

.language-toggle-icon span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.language-toggle-label {
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
}

.language-panel {
    display: flex;
    align-items: center;
    gap: 6px;
}

.translate-label {
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #c9c9ce;
    line-height: 1;
}

.logo {
    height: clamp(46px, 5vw, 72px);
    width: auto;
    transition: transform 0.3s ease;
}

.warning-badge {
    background: var(--danger);
    color: white;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 0 20px rgba(255, 62, 62, 0.4);
    animation: pulse 2s infinite;
    display: inline-block;
    text-align: center;
    line-height: 1.25;
}

.warning-badge-super {
    display: block;
    width: 100%;
    max-width: none;
    border-radius: 0;
    padding: 10px 16px;
    background: linear-gradient(90deg, #ff3e3e, #ff5757);
    box-shadow: none;
    animation: none;
}

#google_translate_element .goog-te-gadget {
    color: var(--light) !important;
    font-size: 0 !important;
    line-height: 0 !important;
}

#google_translate_element .goog-logo-link,
#google_translate_element .goog-logo-link img {
    display: none !important;
}

.navbar-translate #google_translate_element {
    margin-bottom: 0;
    min-height: 22px;
}

#google_translate_element .goog-te-gadget-simple {
    background: var(--translate-bg) !important;
    border: 1px solid var(--translate-border) !important;
    border-radius: 999px;
    padding: 4px 8px;
    line-height: 1.2 !important;
    transition: background 0.2s ease, border-color 0.2s ease;
}

#google_translate_element .goog-te-gadget-simple:hover {
    background: var(--translate-bg-hover) !important;
    border-color: rgba(255, 120, 120, 0.9) !important;
}

#google_translate_element .goog-te-menu-value span {
    color: var(--translate-text) !important;
    font-size: 0.76rem !important;
    line-height: 1.1 !important;
}

/* Constrain Google Translate dropdown globally */
iframe.goog-te-menu-frame {
    max-height: 400px !important;
    width: auto !important;
}

.goog-te-menu2 {
    max-height: 350px !important;
    overflow-y: auto !important;
}

@media (max-width: 980px) {
    header .container {
        height: 66px;
        padding: 0 28px;
    }

    .navbar-layout {
        gap: 10px 14px;
    }

    .logo-header {
        height: 44px;
        max-height: 44px;
    }

    .translate-label {
        display: none;
    }

    .warning-badge {
        font-size: 0.68rem;
        padding: 6px 12px;
        max-width: 100%;
    }
}

@media (max-width: 700px) {
    header .container {
        height: 60px;
        padding: 0 18px;
    }

    .navbar-layout {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .navbar-translate {
        width: auto;
        justify-content: flex-end;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        position: relative;
        overflow: visible !important;
    }

    .language-toggle {
        display: inline-flex;
        min-height: 46px;
    }

    .language-panel {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: calc(100vw - 30px);
        max-width: 320px;
        margin-top: 0;
        position: fixed;
        bottom: auto;
        top: auto;
        right: 15px;
        z-index: 1001;
        padding: 12px 10px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 14px;
        background: rgba(10, 10, 10, 0.98);
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
        pointer-events: auto;
        max-height: 60vh;
        overflow-y: auto;
    }

    .navbar-translate.language-open .language-panel {
        display: flex;
        bottom: auto;
        top: 60px;
    }

    .navbar-translate.language-open .language-toggle {
        border-color: rgba(255, 120, 120, 0.65);
    }

    .language-toggle-label {
        display: none;
    }

    .translate-label {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .navbar-translate #google_translate_element {
        width: min(100%, 170px);
        max-width: 170px;
    }

    /* Strictly contain Google Translate dropdown */
    iframe.goog-te-menu-frame {
        max-height: 300px !important;
        max-width: 300px !important;
        overflow: hidden !important;
    }

    /* Ensure dropdown stays within bounds */
    .language-panel #google_translate_element .goog-te-menu2 {
        max-height: 280px !important;
        overflow-y: auto !important;
        max-width: 100% !important;
    }

    /* Constrain the entire Google Translate widget */
    .language-panel #google_translate_element {
        max-height: 280px;
        max-width: 100%;
        overflow: hidden;
    }

    .logo-header {
        height: 46px;
        max-height: 46px;
    }

    .navbar-left,
    .navbar-right {
        align-items: center;
    }

    #google_translate_element .goog-te-gadget-simple {
        width: 100% !important;
        max-width: 170px;
        padding: 3px 6px;
        text-align: center;
    }

    #google_translate_element .goog-te-gadget {
        font-size: 0.72rem;
    }

    .translate-label {
        font-size: 0.58rem;
        letter-spacing: 0.06em;
    }

    .warning-badge {
        width: auto;
        max-width: min(92vw, 360px);
        border-radius: 22px;
    }

    /* Keep the super header alert as true full-width on mobile */
    .warning-badge-super {
        width: 100%;
        max-width: none;
        border-radius: 0;
        padding: 10px 12px;
    }

    .super-header-warning-inner {
        padding: 0;
    }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 62, 62, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 62, 62, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 62, 62, 0); }
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: radial-gradient(circle at 50% 50%, #1a0a0a 0%, #0a0a0a 100%);
}

.hero-flex {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 64px;
    align-items: center;
}

@media (max-width: 968px) {
    .hero-flex { grid-template-columns: 1fr; gap: 40px; text-align: center; }
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(to bottom, #fff 40%, #888);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 40px;
    max-width: none;
}

@media (max-width: 968px) {
    .hero-text p { margin-left: auto; margin-right: auto; }
}

.btn-danger {
    background: var(--danger);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(255, 62, 62, 0.2);
}

.btn-danger:hover {
    background: var(--danger-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 62, 62, 0.3);
}

.video-container {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 16/9;
    border: 1px solid var(--border);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hero Logo & URL */
.hero-logo-container {
    margin-bottom: 32px;
}

.hero-logo {
    width: clamp(264px, 29vw, 408px);
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 12px;
}

.hero-url {
    color: var(--danger);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.hero-url:hover {
    opacity: 1;
}

@media (max-width: 968px) {
    .hero-logo { margin: 0 auto 12px; }
}

/* Detailed Report Section */
.detailed-report {
    padding: 100px 0;
    background: var(--dark);
}

.detailed-report h2 {
    font-size: 2.5rem;
    margin-bottom: 48px;
    text-align: center;
    background: linear-gradient(to right, #fff, var(--danger));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.report-content {
    max-width: none;
    margin: 0;
    font-size: 1.1rem;
    color: var(--gray);
    line-height: 1.8;
}

.report-content p {
    margin-bottom: 24px;
}

.highlight-box {
    background: var(--dark-accent);
    border-left: 4px solid var(--danger);
    padding: 32px;
    margin: 40px 0;
    border-radius: 0 16px 16px 0;
    color: var(--light);
    font-style: italic;
}

/* Floating Transcription Sidebar */
.floating-transcription {
    --sidebar-width: 340px;
    --sidebar-gap: 24px;
    position: fixed;
    right: var(--sidebar-gap);
    bottom: 24px;
    top: auto;
    transform: translateX(calc(100% + var(--sidebar-gap)));
    width: var(--sidebar-width);
    background: rgba(21, 21, 21, 0.72);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    z-index: 1000;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
}

.floating-transcription.active {
    transform: translateX(0);
    background: rgba(21, 21, 21, 0.82);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    opacity: 1;
    pointer-events: auto;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-size: 1rem;
    color: var(--danger);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.close-btn {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.sidebar-content {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.6;
}

.sidebar-content p {
    margin-bottom: 16px;
}

.sidebar-content strong {
    color: var(--light);
}

.open-btn {
    position: fixed;
    right: 0;
    bottom: 120px;
    transform: none;
    background: var(--danger);
    color: white;
    padding: 12px 10px;
    border: none;
    border-radius: 12px 0 0 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: -5px -5px 15px rgba(255, 62, 62, 0.2);
    white-space: nowrap;
    z-index: 1001;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

body.sidebar-open .open-btn {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .floating-transcription {
        width: 100%;
        right: 0;
        border-radius: 24px 24px 0 0;
        top: auto;
        bottom: 0;
        transform: translateY(100%);
        background: rgba(21, 21, 21, 0.92);
    }

    .floating-transcription.active {
        transform: translateY(0);
        right: 0;
    }

    .open-btn {
        position: fixed;
        right: auto;
        left: 50%;
        top: auto;
        bottom: 12px;
        transform: translateX(-50%);
        transform-origin: center;
        border-radius: 12px;
        writing-mode: horizontal-tb;
        opacity: 1;
        pointer-events: auto;
    }
}

/* Testimonials / Comment System */
.testimonials-section {
    padding: 100px 0;
    background: var(--dark-accent);
    border-top: 1px solid var(--border);
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    max-width: none;
    margin: -30px 0 60px;
    font-size: 1.1rem;
}

.comment-submission {
    max-width: none;
    margin: 0 0 80px;
    background: var(--dark);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(211, 47, 47, 0.2);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--light);
    font-weight: 500;
}

.premium-form input, .premium-form textarea {
    width: 100%;
    padding: 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.premium-form input:focus, .premium-form textarea:focus {
    outline: none;
    border-color: var(--danger);
    background: rgba(255,255,255,0.08);
}

.form-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.form-message.success { background: rgba(46, 125, 50, 0.2); color: #81c784; }
.form-message.error { background: rgba(198, 40, 40, 0.2); color: #e57373; }

.comments-list {
    max-width: none;
    margin: 0;
}

.comment-item {
    background: var(--dark);
    padding: 32px;
    border-radius: 16px;
    margin-bottom: 24px;
    border-left: 3px solid var(--danger);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.comment-author {
    font-weight: 700;
    color: var(--light);
    font-size: 1.1rem;
}

.comment-date {
    color: var(--gray);
    font-size: 0.85rem;
}

.comment-text {
    color: var(--gray);
    line-height: 1.6;
}

.comment-text p {
    margin: 0 0 12px;
}

.comment-text h1,
.comment-text h2,
.comment-text h3,
.comment-text h4,
.comment-text h5,
.comment-text h6 {
    color: var(--light);
    margin: 16px 0 10px;
    line-height: 1.25;
    font-weight: 700;
}

.comment-text h1 { font-size: 1.45rem; }
.comment-text h2 { font-size: 1.3rem; }
.comment-text h3 { font-size: 1.15rem; }

.comment-text ul,
.comment-text ol {
    margin: 10px 0 12px 20px;
}

.comment-text li {
    margin: 4px 0;
}

.comment-text a {
    color: #ffa7a7;
    text-decoration: underline;
}

.comment-text code {
    background: rgba(255, 255, 255, 0.08);
    color: #ffd2d2;
    padding: 1px 5px;
    border-radius: 6px;
    font-size: 0.92em;
}

.comment-text hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 14px 0;
}

.loading-spinner, .no-comments {
    text-align: center;
    color: var(--gray);
    padding: 40px;
    font-style: italic;
}

/* Footer */
footer {
    padding: 80px 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

#google_translate_element {
    margin-bottom: 24px;
    min-height: 32px;
}

#google_translate_element .goog-te-gadget {
    color: var(--gray) !important;
    font-size: 0.82rem !important;
}

#google_translate_element .goog-logo-link,
#google_translate_element .goog-logo-link img {
    display: none !important;
}

#google_translate_element .goog-te-gadget > span {
    display: none;
}

#google_translate_element .goog-te-gadget span[style*="text-decoration"] {
    display: none !important;
}

#google_translate_element .goog-te-combo,
#google_translate_element select {
    background: var(--translate-bg);
    border: 1px solid var(--translate-border);
    border-radius: 999px;
    color: var(--translate-text);
    min-width: 0;
    width: 100%;
    max-width: 240px;
    padding: 7px 28px 7px 12px;
    font-size: 0.82rem;
    outline: none;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#google_translate_element .goog-te-combo:hover,
#google_translate_element select:hover {
    background: var(--translate-bg-hover);
    border-color: rgba(255, 120, 120, 0.9);
}

#google_translate_element .goog-te-combo option,
#google_translate_element select option {
    color: #111;
    background: #fff;
}

#google_translate_element .goog-te-combo:focus,
#google_translate_element select:focus {
    border-color: rgba(255, 120, 120, 0.85);
    box-shadow: 0 0 0 2px rgba(255, 62, 62, 0.3);
}

footer p {
    color: var(--gray);
    font-size: 0.9rem;
}

.footer-secret-pi {
    position: fixed;
    left: 4px;
    bottom: 3px;
    font-size: 0.62rem;
    color: rgba(245, 245, 247, 0.26);
    text-decoration: none;
    line-height: 1;
    user-select: none;
    transition: color 0.2s ease, opacity 0.2s ease;
    opacity: 0.55;
    z-index: 1200;
}

.footer-secret-pi:hover,
.footer-secret-pi:focus {
    color: rgba(245, 245, 247, 0.48);
    opacity: 0.9;
}

/* Hide disruptive Google Translate UI overlays */
.goog-te-banner-frame,
#goog-gt-vt,
#goog-gt-tt,
.goog-te-balloon-frame,
.VIpgJd-ZVi9od-ORHb,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.VIpgJd-ZVi9od-aZ2wEe-OiiCO {
    display: none !important;
    visibility: hidden !important;
    max-height: 0 !important;
}

iframe.goog-te-banner-frame {
    display: none !important;
    visibility: hidden !important;
}

/* Fallback for new Google variants that inject top fixed container iframe */
iframe.skiptranslate[id*=".container"]:not(.goog-te-menu-frame),
iframe.skiptranslate.goog-te-banner-frame:not(.goog-te-menu-frame) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    border: 0 !important;
}

/* Reset the body and html position */
html {
    top: 0 !important;
    margin-top: 0 !important;
}

body {
    top: 0 !important;
    margin-top: 0 !important;
    position: static !important;
}

/* Target the shifted layout when translation is active */
html.translated-ltr,
html.translated-rtl,
.translated-ltr body,
.translated-rtl body {
    margin-top: 0 !important;
    top: 0 !important;
}

.goog-text-highlight {
    background: none !important;
    box-shadow: none !important;
}
