/*
Theme Name: Quardle Theme
Theme URI: https://example.com/quardle-theme
Author: Antigravity
Author URI: https://example.com
Description: A minimal and clean theme for Quardle.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: quardle-theme
*/

/* ==========================================================================
   1. Reset & Base Styles
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* ==========================================================================
   2. Header Styles
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 80px;
    display: flex;
    align-items: center;
}

.header-inner.centered-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Left: Logo/Heading */
.site-logo a {
    font-size: 24px;
    font-weight: 800;
    color: #2563eb; /* Modern Blue */
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

/* Center: Navigation */
.main-navigation ul {
    display: flex;
    gap: 32px;
}

.main-navigation ul li {
    position: relative;
}

.main-navigation ul li a {
    font-weight: 500;
    color: #4b5563;
    font-size: 15px;
}

.main-navigation ul li a:hover {
    color: #2563eb;
}

/* Dropdown Support */
.main-navigation ul li ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    margin-top: 10px;
}

.main-navigation ul li:hover > ul {
    display: flex;
}

.main-navigation ul li ul li a {
    padding: 10px 20px;
    display: block;
}

.main-navigation ul li ul li a:hover {
    background: #f9fafb;
}

/* Right: Call Button */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-call {
    background: #2563eb;
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.2s ease, background 0.3s ease;
}

.btn-call:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.btn-call:active {
    transform: translateY(0);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: #333;
    margin: 5px 0;
    transition: 0.3s;
}

/* ==========================================================================
   3. Footer Styles
   ========================================================================== */
.site-footer {
    background: #111827;
    color: #9ca3af;
    padding: 80px 0 0;
    margin-top: 60px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 60px;
}

.footer-brand .footer-logo {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    display: block;
}

.footer-brand .tagline {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.footer-heading {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 24px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: #fff;
}

.contact-info li {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.social-icons {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.social-icons a {
    width: 36px;
    height: 36px;
    background: #1f2937;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.social-icons a:hover {
    background: #2563eb;
}

.footer-bottom {
    border-top: 1px solid #1f2937;
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.footer-legal-links {
    display: flex;
    gap: 24px;
}

/* ==========================================================================
   4. Responsive Styles
   ========================================================================== */
@media (max-width: 1024px) {
    .footer-top {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-brand {
        grid-column: span 3;
    }
}

@media (max-width: 768px) {
    .site-header {
        height: 70px;
    }

    .mobile-toggle {
        display: block;
    }

    .main-navigation {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: #fff;
        transition: 0.4s;
        padding: 40px 24px;
        overflow-y: auto;
    }

    .main-navigation.active {
        left: 0;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 20px;
    }

    .main-navigation ul li a {
        font-size: 18px;
    }

    .main-navigation ul li ul {
        position: static;
        box-shadow: none;
        display: flex;
        padding-left: 20px;
        margin-top: 10px;
    }

    .header-right {
        display: none; /* Hide call button on small mobile or move inside menu */
    }

    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* ==========================================================================
   5. Game Styles (Quardle)
   ========================================================================== */
.game-section {
    padding: 40px 0;
    background: #f8fafc;
}

.game-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 30px;
    gap: 15px;
}

.game-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
}

.game-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    font-size: 18px;
    background: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#restart-game {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
}

.game-container {
    max-width: 480px;
    margin: 0 auto;
    border: 2px solid #000;
    padding: 20px;
    border-radius: 16px;
    background: #fff;
}

.game-boards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 30px;
}

.board-wrapper {
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease;
}

.board-wrapper.solved {
    opacity: 0.6;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

.tile {
    aspect-ratio: 1;
    border: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
    user-select: none;
    transition: all 0.1s ease;
}

.tile.active {
    border-color: #94a3b8;
}

.tile.correct {
    background-color: #22c55e;
    border-color: #22c55e;
    color: #fff;
}

.tile.present {
    background-color: #eab308;
    border-color: #eab308;
    color: #fff;
}

.tile.absent {
    background-color: #64748b;
    border-color: #64748b;
    color: #fff;
}

/* Animations */
.reveal {
    animation: flip 0.6s ease forwards;
}

@keyframes flip {
    0% { transform: rotateX(0); }
    50% { transform: rotateX(90deg); }
    100% { transform: rotateX(0); }
}

.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Keyboard */
.keyboard {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.keyboard button {
    height: 40px;
    min-width: 24px;
    padding: 0 6px;
    background: #e2e8f0;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    font-size: 11px;
    transition: background 0.2s;
}

.keyboard button:hover {
    background: #cbd5e1;
}

.keyboard button.wide-button {
    min-width: 65px;
}

.keyboard button.correct { background: #22c55e; color: #fff; }
.keyboard button.present { background: #eab308; color: #fff; }
.keyboard button.absent { background: #475569; color: #fff; }

/* ==========================================================================
   6. Content Styles
   ========================================================================== */
.content-section {
    padding: 80px 0;
}

.narrow-content {
    max-width: 800px;
}

.game-info h2 {
    font-size: 28px;
    margin: 40px 0 20px;
    color: #0f172a;
}

.game-info p {
    margin-bottom: 20px;
    font-size: 17px;
    color: #475569;
}

.rule-examples {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
    background: #f1f5f9;
    padding: 30px;
    border-radius: 12px;
}

.example-tiles {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.example-tiles span {
    width: 40px;
    height: 40px;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border-radius: 4px;
}

.example-tiles .tile { border: none; width: 40px; height: 40px; font-size: 16px; }

.faq-item {
    margin-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 20px;
}

.faq-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #1e293b;
}

@media (max-width: 768px) {
    .game-boards-grid {
        grid-template-columns: 1fr;
    }
    .keyboard button {
        height: 50px;
        padding: 0 8px;
        font-size: 12px;
    }
}

/* ==========================================================================
   7. Hello Wordl Specific Styles
   ========================================================================== */
.hello-wordl-container {
    max-width: 500px;
    text-align: center;
}

.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #475569;
}

input[type="range"] {
    cursor: pointer;
    accent-color: #2563eb;
}

.btn-secondary {
    padding: 6px 16px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.single-board {
    margin: 0 auto 30px;
    max-width: 350px;
}

.game-status {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #1e293b;
    min-height: 27px;
}

.game-mode-info {
    font-size: 14px;
    color: #64748b;
    margin: 20px 0 10px;
}

.btn-share {
    padding: 10px 20px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.btn-share:hover {
    background: #f1f5f9;
}

.centered {
    justify-content: center;
}
/* ==========================================================================
   8. Secondary Header Styles
   ========================================================================== */
.secondary-header {
    background: #fdfbff;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.games-nav.centered-nav ul {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.games-nav ul li a {
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.games-nav ul li a:hover {
    background: #f3e8ff;
    color: #7c3aed;
}

.games-nav ul li a.active {
    background: #f3e8ff;
    color: #7c3aed;
}

/* ==========================================================================
   9. Daily Wordle Specific Styles
   ========================================================================== */
.game-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.game-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #1e293b;
}

.game-icons, .help-icon {
    font-size: 20px;
    cursor: pointer;
    color: #64748b;
}

.game-icons {
    display: flex;
    gap: 15px;
}

.game-footer-actions {
    margin-top: 30px;
}

.btn-primary {
    padding: 12px 32px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #1d4ed8;
}
/* ==========================================================================
   10. Settings Modal & Dark Theme
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.settings-modal {
    background: #fff;
    width: 90%;
    max-width: 450px;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.modal-header h2 {
    font-size: 20px;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f1f5f9;
}

.setting-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: #1e293b;
}

.setting-info p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #3b82f6;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Dark Theme Utility */
body.dark-mode {
    background: #0f172a;
    color: #f8fafc;
}

body.dark-mode .site-header,
body.dark-mode .secondary-header {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .site-logo a,
body.dark-mode .games-nav ul li a {
    color: #f1f5f9;
}

body.dark-mode .game-container,
body.dark-mode .settings-modal {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
}

body.dark-mode .setting-info h4,
body.dark-mode .game-title {
    color: #f1f5f9;
}

body.dark-mode .tile {
    background: #0f172a;
    border-color: #334155;
    color: #fff;
}

body.dark-mode .tile.absent {
    background: #334155;
}

body.dark-mode .keyboard button {
    background: #334155;
    color: #fff;
}
