@font-face {
    font-family: 'Bahij TheSansArabic';
    src: url('fonts/Bahij_TheSansArabic-ExtraLight.woff') format('woff'),
        url('fonts/Bahij_TheSansArabic-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bahij TheSansArabic';
    src: url('fonts/Bahij_TheSansArabic-SemiBold.woff') format('woff'),
        url('fonts/Bahij_TheSansArabic-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    --success-gradient: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    --warning-gradient: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --bg-light: #f8f9fa;
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-medium: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.15);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Navigation Styles */
.navbar {
    background: var(--primary-gradient);
    padding: 15px 0;
    box-shadow: var(--shadow-medium);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    color: white;
    font-size: 1.5em;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-item a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 25px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item a:hover,
.nav-item a.active {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.lang-switcher {
    display: flex;
    gap: 10px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9em;
    transition: var(--transition);
}

.lang-btn:hover,
.lang-btn.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background: var(--primary-gradient);
        flex-direction: column;
        justify-content: flex-start;
        padding: 30px 0;
        transition: right 0.3s ease;
    }

    .nav-menu.active {
        right: 0;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-item {
        width: 100%;
        text-align: center;
    }

    .nav-item a {
        width: 80%;
        margin: 0 auto;
        justify-content: center;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Bahij TheSansArabic', 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.03;
    background-image: radial-gradient(circle at 25% 25%, #ffffff 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, #ffffff 2px, transparent 2px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header {
    background: var(--primary-gradient);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.header-content {
    position: relative;
    z-index: 2;
}

.header h1 {
    font-size: 2.8em;
    margin-bottom: 15px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
}

.header p {
    font-size: 1.2em;
    opacity: 0.95;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

.header-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.9;
}

.content {
    padding: 40px 30px;
    background: linear-gradient(to bottom, #ffffff, #f8f9fa);
}

.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: #667eea;
    font-size: 1.2em;
}

.form-group {
    margin-bottom: 30px;
}

label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1em;
}

textarea {
    width: 100%;
    min-height: 180px;
    padding: 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition);
    direction: rtl;
    text-align: right;
    background: #ffffff;
    box-shadow: var(--shadow-light);
}

textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), var(--shadow-medium);
    transform: translateY(-2px);
}

textarea::placeholder {
    color: #aab4bd;
    direction: rtl;
}

.btn {
    background: var(--primary-gradient);
    color: white;
    padding: 18px 40px;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.btn:active {
    transform: translateY(-1px);
}

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

.btn.loading {
    background: var(--secondary-gradient);
    cursor: wait;
    animation: pulse 1.5s infinite;
}

.btn.loading i {
    animation: spin 1s linear infinite;
}

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

.loading {
    display: none;
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    margin: 30px 0;
    box-shadow: var(--shadow-light);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-text {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-primary);
}

.result {
    margin-top: 40px;
    padding: 30px;
    border-radius: var(--border-radius);
    animation: slideInUp 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 6px solid #28a745;
}

.result.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left: 6px solid #dc3545;
    color: #343232;
}

.result.warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 6px solid #ffc107;
    color: #856404;
}

.result-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.result-icon {
    font-size: 2.5em;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.result-title {
    font-size: 1.6em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.result-subtitle {
    font-size: 1.1em;
    opacity: 0.8;
    margin-top: 5px;
    font-weight: 400;
}

.confidence-section {
    margin: 25px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.confidence-label {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
    color: var(--text-primary);
}

.confidence-bar {
    width: 100%;
    height: 24px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    margin: 15px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #ffc107 50%, #dc3545 100%);
    transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.confidence-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.confidence-text {
    text-align: center;
    margin-top: 15px;
    font-size: 1.3em;
    font-weight: 600;
    color: var(--text-primary);
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.detail-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.detail-value {
    font-size: 1.8em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.detail-label {
    font-size: 0.95em;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fake {
    color: #dc3545;
}

.real {
    color: #28a745;
}

.info-box {
    background: linear-gradient(135deg, #e7f3ff 0%, #cce7ff 100%);
    border-left: 5px solid #2196f3;
    padding: 25px;
    margin: 30px 0;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    backdrop-filter: blur(10px);
}

.info-box h3 {
    color: #1976d2;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-box p {
    color: #424242;
    line-height: 1.7;
    font-size: 1.05em;
}

.examples {
    margin-top: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.examples h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.4em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.example {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    margin: 15px 0;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: var(--transition);
    direction: rtl;
    text-align: right;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.example::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-gradient);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.example:hover::before {
    transform: scaleY(1);
}

.example:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateX(-8px);
    box-shadow: var(--shadow-medium);
}

.example-icon {
    margin-left: 8px;
    margin-right: 8px;
    font-size: 1.1em;
    color: #667eea;
    opacity: 0.8;
    vertical-align: middle;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.status-indicator.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.status-indicator.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.error-details {
    background: rgba(220, 53, 69, 0.05);
    border: 1px solid rgba(220, 53, 69, 0.1);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.error-details h4 {
    color: #dc3545;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-details code {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    display: block;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
    overflow-x: auto;
}

.debug-section {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.debug-section summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.debug-section summary:hover {
    background: rgba(0, 0, 0, 0.05);
}

.debug-section pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 12px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    font-family: 'Courier New', monospace;
    line-height: 1.4;
}

.ml-confirmation {
    background: linear-gradient(135deg, #d5ebff 0%, #d4eafc 100%);
    border: 1px solid rgba(40, 167, 69, 0.2);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-light);
}

.ml-confirmation strong {
    color: #1876d2;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Enhanced Kurdish text styling */
.kurdish-text,
h1, h2, h3, h4, h5, h6, p, label, .btn, textarea, .result-text {
    font-family: 'Bahij TheSansArabic', 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 200;
    letter-spacing: 0.02em;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Special styling for Kurdish headers using SemiBold */
h1, h2, h3 {
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Bold text elements using SemiBold */
strong, b, .btn, .section-title, .confidence-text {
    font-weight: 600;
}

/* Better text area styling for Kurdish input */
textarea {
    font-size: 1.1em;
    font-weight: 200;
    line-height: 1.8;
}

/* Direction-specific styles */
[dir="rtl"] {
    text-align: right;
    direction: rtl;
}

[dir="ltr"] {
    text-align: left;
    direction: ltr;
}

/* Language-specific adjustments */
[dir="ltr"] .header h1,
[dir="ltr"] .header p,
[dir="ltr"] .info-box h3,
[dir="ltr"] .info-box p,
[dir="ltr"] .result-title,
[dir="ltr"] .result-subtitle {
    text-align: left;
}

[dir="ltr"] .nav-brand,
[dir="ltr"] .nav-item a {
    text-align: left;
}

/* Fix mobile menu positioning for LTR */
[dir="ltr"] .nav-menu {
    left: -100%;
    right: auto;
}

[dir="ltr"] .nav-menu.active {
    left: 0;
    right: auto;
}

/* Textarea direction */
[dir="ltr"] textarea {
    text-align: left;
    direction: ltr;
}

[dir="rtl"] textarea {
    text-align: right;
    direction: rtl;
}

/* Form alignment */
[dir="ltr"] .form-group label {
    text-align: left;
}

[dir="rtl"] .form-group label {
    text-align: right;
}

/* List alignment for about page */
[dir="ltr"] ul {
    text-align: left;
    direction: ltr;
    padding-left: 30px;
    padding-right: 0;
}

[dir="rtl"] ul {
    text-align: right;
    direction: rtl;
    padding-right: 30px;
    padding-left: 0;
}

/* Character counter positioning */
[dir="ltr"] .char-counter {
    float: right !important;
}

[dir="rtl"] .char-counter {
    float: left !important;
}

/* Global icon spacing for RTL text */
.fas, .far, .fal, .fab {
    margin-left: 0.5em;
}

/* Specific spacing for icons before Kurdish text */
h1 i, h2 i, h3 i, h4 i, h5 i, h6 i, label i, strong i, summary i {
    margin-left: 0.5em;
}

/* Icon positioning adjustments */
[dir="ltr"] .fas,
[dir="ltr"] .far,
[dir="ltr"] .fal,
[dir="ltr"] .fab {
    margin-right: 0.5em;
    margin-left: 0;
}

[dir="rtl"] .fas,
[dir="rtl"] .far,
[dir="rtl"] .fal,
[dir="rtl"] .fab {
    margin-left: 0.5em;
    margin-right: 0;
}

/* PFO-style Header Styles - Matching the exact design */
#g-top {
    background: linear-gradient(135deg, #7452ab 0%, #6d68ca 100%);
    padding: 10px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin-bottom: 0;
}

.g-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.g-grid {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.g-grid:last-child {
    margin-bottom: 0;
}

.g-block {
    padding: 5px;
    display: flex;
    align-items: center;
}

.size-13 { width: 13%; justify-content: flex-end; }
.size-22 { width: 22%; justify-content: flex-end; }
.size-65 { width: 65%; justify-content: flex-start; }
.size-100 { width: 100%; justify-content: flex-start; }

.align-right { text-align: right; }
.nomarginall { margin: 0; }
.nopaddingall { padding: 0; }

.hidden-phone { display: flex; }
.hidden-desktop { display: none; }

/* Language switcher - White text like PFO */
.g-block.size-13 a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    margin: 0 3px;
    font-size: 14px;
    transition: color 0.3s ease;
    font-family: Arial, sans-serif;
}

.g-block.size-13 a:hover {
    color: #f0f0f0;
    text-decoration: underline;
}

.g-block.size-13 a[style*="large"] {
    font-size: 16px;
    font-weight: 600;
}

/* Main logo container - left positioning */
.g-block.size-65 {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-left: 20px;
}

/* Simple logo container - left positioning for full width */
.g-block.size-100 {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-left: 20px;
    direction: ltr; /* Force LTR to ensure left positioning */
}

.g-block.size-65 img,
.g-block.size-100 img {
    max-height: 60px;
    height: auto;
    width: auto;
    max-width: 100%;
}

/* Podcast link - positioned like PFO */
.g-block.size-22 {
    justify-content: flex-end;
    padding-right: 15px;
}

.g-block.size-22 img {
    max-height: 95px;
    width: auto;
    transition: transform 0.3s ease;
}

.g-block.size-22 img:hover {
    transform: scale(1.05);
}

.g-block.size-22 div[style*="margin-top"] {
    margin-top: 8px !important;
}

/* Enhanced Result Display Styles */
.confidence-display {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.9));
    border-radius: 12px;
    box-shadow: var(--shadow-light);
}

.confidence-header h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.2em;
}

.confidence-meter {
    position: relative;
    margin: 20px 0;
}

.meter-background {
    width: 100%;
    height: 25px;
    background: #e9ecef;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

.meter-fill {
    height: 100%;
    border-radius: 15px;
    transition: width 1s ease-in-out;
    position: relative;
}

.meter-fill.meter-green {
    background: linear-gradient(90deg, #28a745, #34ce57);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.meter-fill.meter-red {
    background: linear-gradient(90deg, #dc3545, #e55563);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.meter-value {
    text-align: center;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 15px;
}

/* Statistics Grid */
.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.stat-number {
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.9em;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.3;
}

.stat-red .stat-number {
    color: #dc3545;
}

.stat-green .stat-number {
    color: #28a745;
}

/* Analysis Section */
.analysis-section {
    margin: 25px 0;
    padding: 20px;
    background: rgba(52, 144, 220, 0.1);
    border-radius: 12px;
    border-left: 4px solid #3490dc;
}

.analysis-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1em;
}

.analysis-header i {
    color: #3490dc;
    font-size: 1.2em;
}

.analysis-content p {
    margin-bottom: 12px;
    line-height: 1.7;
    color: var(--text-primary);
}

.analysis-content strong {
    color: #3490dc;
    font-weight: 600;
}

/* Adjust main header to work with new top header */
.header {
    margin-top: 0;
    padding-top: 20px;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Mobile responsive - matching PFO behavior */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 12px;
    }

    .header {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 2.2em;
    }

    .header p {
        font-size: 1.1em;
    }

    .content {
        padding: 25px 20px;
    }

    .result-details {
        grid-template-columns: 1fr;
    }

    .examples {
        padding: 20px;
    }

    .example {
        padding: 15px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hidden-phone { display: none; }
    .hidden-desktop { display: flex; }
    
    .g-grid {
        flex-direction: column;
        text-align: left; /* Change to left for mobile */
    }
    
    .size-13, .size-22, .size-65, .size-100 {
        width: 100%;
        justify-content: flex-start; /* Change to flex-start instead of center */
    }
    
    .g-block.size-100.hidden-desktop {
        margin: 10px 0;
        justify-content: flex-start; /* Ensure left alignment on mobile too */
    }
    
    .g-block.size-100.hidden-desktop img {
        max-height: 60px;
        width: auto;
    }

    .g-block.size-13 {
        order: 1;
        margin-bottom: 10px;
    }

    .g-block.size-65 {
        order: 2;
        margin-bottom: 10px;
    }

    .g-block.size-100 {
        order: 1;
        margin-bottom: 10px;
        justify-content: flex-start;
        text-align: left;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .header p {
        font-size: 1em;
    }

    .content {
        padding: 20px 15px;
    }

    textarea {
        padding: 15px;
        min-height: 150px;
    }

    .result {
        padding: 20px;
    }

    .result-icon {
        font-size: 2em;
    }

    .result-title {
        font-size: 1.3em;
    }
}
