:root {
    --bg-color: #0a0a0a;
    --surface-color: #1a1a1a;
    --primary: #00e5ff;
    --primary-dim: rgba(0, 229, 255, 0.15);
    --text-main: #ffffff;
    --text-muted: #888888;
    --border: #333333;
    --danger: #ff4d4d;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --font-main: 'Inter', sans-serif;
}

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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background-color: #000;
    /* Outer background for desktop */
    color: var(--text-main);
    line-height: 1.5;
    /* Allow scrolling on page level for SEO section */
    touch-action: pan-y;
}

/* Desktop Layout */
.desktop-layout {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100vh;
    height: 100dvh;
}

.ad-space {
    display: none;
    /* Hidden on mobile */
    width: 300px;
    background: #111;
    color: #555;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 1px dashed #333;
    flex-direction: column;
}

@media (min-width: 1080px) {
    .ad-space {
        display: flex;
        display: none;
    }
}

/* App Container */
#app-container {
    width: 100%;
    max-width: 800px;
    /* Tablet/Desktop relaxed constraint */
    height: 100%;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
}

/* Views */
.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    transform: translateX(100%);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.editor-canvas {
    flex-grow: 1;
    min-height: 0;
    /* Prevent flex children from pushing container bounds */
}

.top-bar,
.bottom-bar,
.editor-bottom-bar,
.pages-row {
    flex-shrink: 0;
    /* Never shrink these bars */
}

.view.active {
    transform: translateX(0);
    opacity: 1;
    z-index: 20;
}

/* specific view directions for RTL support */
[dir="rtl"] .view {
    transform: translateX(-100%);
}

[dir="rtl"] .view.active {
    transform: translateX(0);
}


/* Common UI Elements */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    min-height: 64px;
    background-color: var(--bg-color);
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.editor-top-bar {
    height: auto;
    flex-direction: row;
    padding: 8px 16px;
}

.header-center {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.secondary-actions {
    display: none;
}

.main-top-bar {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.icon-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition);
}

.icon-btn:active {
    background: var(--surface-color);
}

.text-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
}

.text-btn.primary {
    color: var(--primary);
}

.title {
    font-size: 18px;
    font-weight: 600;
    flex-grow: 1;
    text-align: center;
}

/* Home View Elements */
.search-container-wrapper {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    /* Define a height for vertical centering to be visible */
}

.search-container {
    background-color: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 600px;
    /* Restrict width for horizontal centering to be visible */
}

.search-container i {
    color: var(--text-muted);
}

.search-container input {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 16px;
    width: 100%;
    outline: none;
    font-family: var(--font-main);
}

.search-container input::placeholder {
    color: var(--text-muted);
}

.content-area {
    padding: 0 20px 140px 20px;
    flex-grow: 1;
    overflow-y: auto;
}

.section-title {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 50vh;
    height: 50dvh;
    text-align: center;
    color: var(--text-muted);
}

.empty-icon-wrap {
    width: 80px;
    height: 80px;
    background: var(--surface-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 16px;
}

.fab-container {
    position: absolute;
    bottom: 110px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 50;
}

.fab {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: #000;
    border: none;
    font-size: 24px;
    box-shadow: 0 8px 24px rgba(0, 229, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.fab:active {
    transform: scale(0.9);
}

[dir="rtl"] .fab-container {
    right: auto;
    left: 32px;
}

.fab-login-prompt {
    background: var(--surface-color);
    padding: 12px 20px;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.fab-login-prompt span {
    font-size: 14px;
    font-weight: 500;
}

.fab-login-prompt i {
    color: #4285F4;
    font-size: 18px;
}

.fab-login-prompt:active {
    transform: scale(0.95);
    background: #222;
}

/* Scanner View */
.camera-feed-dummy {
    flex-grow: 1;
    background-color: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-finder {
    width: 85%;
    height: 75%;
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-sm);
    position: relative;
    box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.5);
    /* Dim outside */
    z-index: 5;
}

.camera-feed-container {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

#camera-video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.view-finder::before,
.view-finder::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--primary);
    border-style: solid;
}

.view-finder::before {
    top: -2px;
    left: -2px;
    border-width: 3px 0 0 3px;
}

.view-finder::after {
    bottom: -2px;
    right: -2px;
    border-width: 0 3px 3px 0;
}

.camera-overlay-text {
    position: absolute;
    bottom: 20%;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: var(--radius-lg);
    font-size: 14px;
}

.scanner-controls {
    height: 180px;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
}

.mode-selector {
    display: flex;
    overflow-x: auto;
    padding: 16px 20px;
    gap: 24px;
    scrollbar-width: none;
    justify-content: center;
    /* Center align items */
}

.mode-selector::-webkit-scrollbar {
    display: none;
}

.mode-item {
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}

.mode-item.active {
    color: var(--primary);
}

.capture-actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 20px;
    flex-grow: 1;
}

.capture-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid var(--text-main);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.capture-inner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--text-main);
    transition: transform 0.1s, border-radius 0.1s;
}

.capture-btn:active .capture-inner {
    transform: scale(0.9);
}

/* Crop View */
.crop-area {
    flex-grow: 1;
    background-color: #111;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.crop-area img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.dummy-doc-preview {
    width: 80%;
    height: 70%;
    background: #e0e0e0;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* ---- CROP UI FIXES ---- */
.crop-polygon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Let touches pass to JS logic except on corners */
    border: none;
    background: transparent;
}

.corner {
    position: absolute;
    width: 44px;
    /* Larger invisible touch target */
    height: 44px;
    background: transparent;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    pointer-events: auto;
    /* Re-enable clicks on corners */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Prevent system context menu and scrolling while dragging */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
}

/* The actual visible dot inside the larger touch target */
.corner::after {
    content: '';
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.bottom-bar {
    padding: 8px 0;
    min-height: 80px;
    background: var(--surface-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Editor View */
.file-name-edit {
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    flex-grow: 1;
    outline: none;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.2s;
    padding: 4px;
}

.file-name-edit:focus {
    border-bottom-color: var(--primary);
}

.editor-canvas {
    flex-grow: 1;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.canvas-floating-actions {
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    /* Let clicks pass through container */
    z-index: 500;
    /* High z-index */
}

.canvas-action-btn {
    pointer-events: auto;
    /* Buttons are clickable */
    background: rgba(30, 30, 30, 0.6) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    width: 44px;
    height: 44px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.canvas-action-btn.delete-btn {
    color: var(--danger) !important;
}

.canvas-action-btn.tools-btn {
    color: var(--text-main);
}

.canvas-action-btn:active {
    transform: scale(0.9);
    background: rgba(0, 0, 0, 0.5) !important;
}

.dummy-doc-preview.full {
    width: 85%;
    height: 85%;
    background: #f5f5f5;
    transition: transform 0.1s;
    /* For dummy pinch zoom */
}

.editor-bottom-bar {
    background: var(--surface-color);
    border-top: 1px solid var(--border);
}

.action-scroll-container {
    display: flex;
    overflow-x: auto;
    padding: 16px;
    gap: 16px;
    scrollbar-width: none;
    justify-content: space-around;
    /* Spread items equally */
}

@media (max-width: 480px) {
    .action-scroll-container {
        justify-content: flex-start;
        gap: 24px;
    }
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-size: 12px;
    cursor: pointer;
    min-width: 60px;
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.2s;
}

.action-item:active .action-icon {
    background: var(--primary-dim);
    color: var(--primary);
}

.action-item.text-danger,
#btn-editor-delete.text-danger {
    color: var(--danger) !important;
}

#btn-download-bottom .action-icon {
    background: var(--primary) !important;
    color: #000 !important;
    box-shadow: 0 4px 12px rgba(0, 229, 255, 0.3);
}

.action-item.text-danger .action-icon {
    color: var(--danger);
}

/* Sub Toolbars */
.sub-toolbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 24px 20px 40px 20px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
    transform: translateY(100%) scale(0.95);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 20px;
    visibility: hidden;
}

.sub-toolbar.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.slider-group label {
    width: 100px;
    font-size: 14px;
    color: var(--text-muted);
}

.slider-group input[type="range"] {
    flex-grow: 1;
    accent-color: var(--primary);
}

.tool-options {
    display: flex;
    justify-content: space-around;
}

.tool-btn {
    background: none;
    border: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.tool-btn i {
    font-size: 24px;
    width: 48px;
    height: 48px;
    background: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-btn:active i {
    background: var(--primary);
    color: #000;
}

.close-sub-toolbar,
.toolbar-corner-actions {
    position: absolute;
    top: -16px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 210;
}

.toolbar-corner-actions button,
.close-sub-toolbar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s;
}

.toolbar-corner-actions .check-btn,
.close-sub-toolbar {
    background: var(--primary);
    color: #000;
}

.toolbar-corner-actions .reset-btn {
    background: var(--surface-color);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.toolbar-corner-actions button:active {
    transform: scale(0.9);
}

[dir="rtl"] .close-sub-toolbar {
    right: auto;
    left: 20px;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    /* Bottom sheet style */
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

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

.modal-content {
    background: var(--surface-color);
    width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 24px;
    transform: translateY(100%);
    transition: transform var(--transition);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h4 {
    font-size: 18px;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lang-option {
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--bg-color);
    font-size: 16px;
    border: 1px solid transparent;
}

.lang-option.active {
    border-color: var(--primary);
    background: var(--primary-dim);
    color: var(--primary);
    font-weight: 600;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.setting-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.setting-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
}

.status-badge {
    font-size: 12px;
    background: var(--surface-color);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

/* SEO Section */
.site-info-section {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    color: #fff;
    line-height: 1.6;
}

.site-info-section h2 {
    color: var(--primary);
    margin-bottom: 16px;
    font-size: 24px;
}

.site-info-section h3 {
    margin-top: 24px;
    margin-bottom: 8px;
    color: #ddd;
    font-size: 20px;
}

.site-info-section p {
    margin-bottom: 12px;
    color: #bbb;
}

/* Call to Action Card */
.cta-card {
    background: linear-gradient(135deg, var(--surface-color), #222);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.cta-icon {
    font-size: 40px;
    color: #4285F4;
    margin-bottom: 16px;
    background: rgba(66, 133, 244, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-content h4 {
    font-size: 18px;
    margin-bottom: 8px;
}

.cta-content p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.cta-btn {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    width: 100%;
}

.cta-btn:active {
    transform: scale(0.98);
}

/* Centered Modals */
.modal-centered {
    align-items: center;
    justify-content: center;
}

.modal-centered .modal-content {
    transform: translateY(20px) scale(0.95);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 440px;
    max-height: 90vh;
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
}

.modal-centered.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-full .modal-body {
    overflow-y: auto;
    padding-bottom: 20px;
}

.lang-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.lang-grid .lang-option {
    padding: 12px;
    text-align: center;
    font-size: 14px;
    border: 1px solid var(--border);
}

/* Quick Tools */
.bottom-tools-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--surface-color);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    z-index: 40;
}

.quick-tools-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 0 100px 0 20px;
    /* 100px padding-right so last item isn't blocked by FAB */
    scrollbar-width: none;
    width: 100%;
}

.quick-tools-scroll::-webkit-scrollbar {
    display: none;
}

.quick-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 72px;
    text-decoration: none;
    color: var(--text-main);
    -webkit-tap-highlight-color: transparent;
}

.quick-tool .tool-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--surface-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    transition: transform 0.2s, background 0.2s;
}

.quick-tool:active .tool-icon {
    transform: scale(0.95);
    background: #222;
}

.quick-tool span {
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    color: var(--text-muted);
}

/* Magnifier */
.corner-magnifier {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    background: #000;
    overflow: hidden;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -150%);
}

.corner-magnifier::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: rgba(0, 229, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.page-thumbnail {
    width: 44px;
    height: 60px;
    background: var(--surface-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border: 1px solid var(--border);
    flex-shrink: 0;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
    
     /* Prevent system context menu during drag-sort */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.page-thumbnail.active {
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary-dim);
}

.page-thumbnail.add-new {
    border: 2px dashed var(--primary);
    color: var(--primary);
    font-weight: bold;
}

/* Page Thumbnails Dragging */
.page-thumbnail.dragging {
    opacity: 0.5;
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.page-thumbnail.drag-over {
    border-left: 3px solid var(--primary);
}

/* Main Footer Styles */
.main-footer {
    background-color: #000;
    color: #fff;
    padding: 60px 20px 40px 20px;
    border-top: 1px solid #222;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr 1fr;
    gap: 40px;
}

.footer-col h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 24px;
    text-transform: none;
}

.footer-col p {
    color: #999;
    font-size: 14px;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0px;
}

.footer-col ul li a {
    color: #999;
    font-size: 14px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 60px auto 0 auto;
    padding-top: 24px;
    border-top: 1px solid #111;
    text-align: center;
}

.footer-bottom p {
    color: #555;
    font-size: 13px;
}

@media (max-width: 900px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .main-footer {
        padding: 40px 20px;
    }
}

/* SEO Content Section Styles */
.seo-section {
    padding: 60px 20px;
    background: #050505;
    color: #eee;
}

.seo-container {
    max-width: 900px;
    margin: 0 auto;
}

.seo-title {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 24px;
    text-align: center;
}

.seo-lead {
    font-size: 18px;
    color: #999;
    text-align: center;
    margin-bottom: 60px;
    line-height: 1.6;
}

.seo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 80px;
}

.seo-card {
    background: var(--surface-color);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.seo-card i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 20px;
}

.seo-card h3 {
    margin-bottom: 12px;
    font-size: 20px;
}

.seo-card p {
    color: #888;
    font-size: 14px;
    line-height: 1.6;
}

.seo-steps {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 60px 0;
}

.seo-step {
    flex: 1;
    text-align: center;
}

.step-num {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    margin: 0 auto 16px auto;
}

.seo-table-wrap {
    overflow-x: auto;
    margin: 60px 0;
}

.seo-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.seo-table th,
.seo-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.seo-table th {
    background: #222;
    color: var(--primary);
}

.seo-faq {
    margin-top: 80px;
}

.faq-item {
    margin-bottom: 24px;
    background: #111;
    padding: 20px;
    border-radius: var(--radius-md);
}

.faq-item h4 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 16px;
}

.faq-item p {
    color: #888;
    font-size: 14px;
}

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

    .seo-steps {
        flex-direction: column;
        align-items: center;
    }
}

.btn-pwa-install {
    display: none;
    margin-top: 15px;
    background: var(--primary);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    align-items: center;
    gap: 8px;
    font-family: var(--font-main);
    transition: transform 0.2s, background 0.2s;
    width: fit-content;
}

.btn-pwa-install:active {
    transform: scale(0.95);
    background: #00c4d8;
}

.btn-pwa-install i {
    font-size: 16px;
}