/* Base Reset & Typography */
:root {
    --bg-color: #F5F5F0;
    /* Off-white paper */
    --text-color: #1A1A1A;
    /* Near black */
    --card-bg: #FFFFFF;
    --border-color: #1A1A1A;
    --accent-red: #e74c3c;
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --font-arabic: 'Tahoma', 'Arial', sans-serif;
    /* Fallback for Dari */
    --btn-bg: #e0e0e0;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --border-color: #444;
    --accent-red: #ff6b6b;
    --btn-bg: #333;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    margin: 0;
    padding: 0;
    /* Remove default padding for full-screen shield */
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
}

/* Language Switcher */
#lang-switcher {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    gap: 5px;
}

#lang-switcher button {
    background: var(--btn-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-family: inherit;
}

/* Download Button */
.card-action-row {
    margin-bottom: 20px;
    text-align: center;
}

.action-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.1);
}

.action-btn:active {
    transform: scale(0.98);
    box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.1);
}

/* Panic Button: Bottom-Left (Blind Spot) */
.panic-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    /* Left thumb blind spot in RTL */
    z-index: 9999;
    background-color: transparent;
    color: #999;
    border: 1px solid #ccc;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.panic-button:active {
    background-color: var(--accent-red);
    color: white;
    opacity: 1;
}

/* Section 1: The Shield (First Screen) */
.shield-section {
    height: 100vh;
    /* Full screen height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    border-bottom: 1px dashed #ccc;
    background-color: #FFFFFF;
}

.shield-content h1 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

/* Search Bar Camouflage */
.fake-search {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 24px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    width: 80%;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fake-search input {
    border: none;
    outline: none;
    font-size: 1rem;
    margin-left: 10px;
    width: 100%;
    color: #555;
    background: transparent;
}

/* Dictionary Card */
.daily-word-card {
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    text-align: left;
    max-width: 80%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

#word-title {
    font-size: 2rem;
    margin: 0;
    color: var(--accent-red);
}

.word-meta {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-style: italic;
}

.definition {
    font-size: 1.1rem;
    line-height: 1.4;
    color: #333;
}

.scroll-hint {
    margin-top: 50px;
    font-size: 0.8rem;
    color: #ccc;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Section 2: Deep Content (Hidden Below) */
.deep-content {
    padding: 40px 20px 80px 20px;
    /* Bottom padding for panic button */
    min-height: 100vh;
}

.container {
    display: grid;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.1s active;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
}

.card:active {
    transform: scale(0.98);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

.icon {
    font-size: 2.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.text-content h2 {
    margin: 0;
    font-size: 1.2rem;
    text-transform: uppercase;
    font-weight: 800;
}

.local-text {
    font-family: var(--font-arabic);
    font-size: 1.2rem;
    color: #555;
    direction: rtl;
    /* Right to left for Dari */
    display: block;
}

/* Footer */
footer {
    text-align: center;
    font-size: 0.8rem;
    color: #ccc;
    padding: 20px;
}