/* css/styles.css */
:root {
    /* Light Theme (Default) */
    --bg-color: #f3f4f6;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --danger-color: #ef4444;
    --danger-hover: #dc2828;
    --accent-color: #ec4899;
    --card-bg: var(--glass-bg);
    --input-bg: rgba(255, 255, 255, 0.9);
    --border-color: rgba(0, 0, 0, 0.1);
}

body.dark-mode {
    --bg-color: #111827;
    --text-color: #f9fafb;
    --text-muted: #9ca3af;
    --glass-bg: rgba(31, 41, 55, 0.6);
    --glass-border: rgba(75, 85, 99, 0.4);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --card-bg: var(--glass-bg);
    --input-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    padding-bottom: 80px;
    overflow-x: hidden;
}

ul, ol {
    margin-bottom: 20px;
}

li {
    margin-bottom: 15px;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.05), transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.05), transparent 25%);
    z-index: -1;
    pointer-events: none;
}

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

.glass-header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.main-nav {
    display: none;
}

@media (min-width: 1024px) {
    .main-nav {
        display: block;
    }
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}
.nav-links svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-links a:hover {
    color: var(--primary-color);
}
.nav-links a:hover svg {
    opacity: 1;
    transform: translateY(-1px);
}

/* Mobile Nav Styles */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-menu-btn:hover {
    background: rgba(99, 102, 241, 0.2);
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    padding: 30px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-overlay.active {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.highlight {
    color: var(--primary-color);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.btn-icon:hover {
    background: rgba(100, 116, 139, 0.1);
}

.lang-select {
    appearance: none;
    background-color: rgba(99, 102, 241, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
    padding: 6px 32px 6px 16px;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 20px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
}

.lang-select:hover, .lang-select:focus {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 6px 14px -4px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

body[dir="rtl"] .lang-select {
    padding: 6px 16px 6px 32px;
    background-position: left 12px center;
}

.hidden { display: none !important; }

.ad-container {
    display: flex;
    justify-content: center;
    margin: 20px auto;
}
ins.adsbygoogle {
    display: block !important;
    min-height: 100px;
    background: transparent !important;
    border: none !important;
    margin: 24px auto;
    position: relative;
    overflow: hidden;
}

/* Remove any helper text or borders from placeholders */
ins.adsbygoogle:empty::before {
    content: "";
    display: none;
}
.ad-sidebar .sidebar-ad {
    height: 250px;
}
.ad-mobile-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-color);
    z-index: 1000;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 5px 0;
}
.ad-mobile-sticky .mobile-ad {
    height: 50px;
    border: none;
    max-width: 320px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .ad-mobile-sticky { display: none; }
    body { padding-bottom: 20px; }
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 20px;
}

@media (min-width: 1024px) {
    .main-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.editor-glass-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
}

textarea {
    width: 100%;
    height: 400px;
    padding: 24px;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 1.125rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    font-family: inherit;
}

.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.02);
}

.status-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.toolbar-actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
}
.btn-secondary:hover {
    background: rgba(100, 116, 139, 0.2);
}

.btn-danger {
    background: transparent;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}
.btn-danger:hover {
    background: var(--danger-color);
    color: white;
}
.w-100 { width: 100%; }

.grammar-alerts {
    margin-top: 20px;
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger-color);
    padding: 16px;
    border-radius: 0 8px 8px 0;
}
.grammar-alerts h4 { margin-bottom: 8px; font-size: 0.9rem;}
.grammar-alerts ul { 
    margin-left: 20px;
    font-size: 0.875rem;
    color: var(--danger-color);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--glass-shadow);
    margin-bottom: 24px;
}

.sticky-wrapper {
    position: sticky;
    top: 90px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-box {
    display: flex;
    flex-direction: column;
}

.stat-title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin-top: 4px;
}
.text-small {
    font-size: 1.5rem;
    color: var(--text-color);
}

.time-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.time-box {
    display: flex;
    align-items: center;
    gap: 16px;
}
.time-box svg {
    color: var(--accent-color);
}

.keyword-section { margin-top: 24px; }
.keyword-section h3 {
    margin-bottom: 16px;
    font-size: 1.125rem;
}
.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.keyword-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.keyword-count {
    background: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
}
.placeholder-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-container {
        height: 60px;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .editor-toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .toolbar-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .toolbar-actions .btn {
        flex: 1;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .keyword-section {
        margin-top: 15px;
    }
    
    .ad-container {
        max-width: 100%;
        overflow: hidden;
    }
}

.site-footer {
    margin-top: 40px;
    padding: 24px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    background: var(--glass-bg);
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.homepage-content {
    margin-top: 40px;
    margin-bottom: 40px;
}

.homepage-content h2, .homepage-content h3 {
    margin-bottom: 16px;
    color: var(--text-color);
}

.homepage-content p {
    margin-bottom: 20px;
    color: var(--text-muted);
    line-height: 1.7;
}

.stats-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.step-list {
    margin-left: 24px;
    color: var(--text-muted);
}

.step-list li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.step-list strong {
    color: var(--text-color);
}

@media (max-width: 768px) {
    .stats-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================== Cookie Consent Banner ===================== */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
    z-index: 9999;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#cookie-consent-banner.visible {
    transform: translateY(0);
}

#cookie-consent-banner p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
    min-width: 200px;
}

#cookie-consent-banner p a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

#cookie-accept-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 9px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    font-family: inherit;
}

#cookie-accept-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

#cookie-decline-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    padding: 9px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

#cookie-decline-btn:hover {
    color: var(--text-color);
    border-color: var(--text-muted);
}

@media (max-width: 600px) {
    #cookie-consent-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .cookie-consent-buttons {
        width: 100%;
    }
    #cookie-accept-btn, #cookie-decline-btn {
        flex: 1;
        text-align: center;
    }
}
/* ================================================================ */
