/* ==========================================
   FALTUKAAM.COM — COMPLETE WEBSITE CSS
   Homepage + All Games + All Tools + Pages
========================================== */

:root {
    --bg: #f5f6ff;
    --surface: #ffffff;
    --text: #191a2e;
    --muted: #666b82;
    --primary: #7048ff;
    --secondary: #ff4fa3;
    --border: #e4e5f1;
    --dark: #17132d;
    --shadow: 0 10px 30px rgba(40, 30, 90, .09);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--secondary);
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
    height: auto;
}

.wrap {
    width: min(1120px, 92%);
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================
   HEADER — supports both header class styles
========================================== */

.header,
.top {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header {
    min-height: 76px;
    padding: 12px 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.top .nav {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo,
.brand {
    color: var(--dark);
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -.8px;
    white-space: nowrap;
}

.logo span,
.brand span {
    color: var(--primary);
}

.nav,
.navlinks {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.nav a,
.navlinks a {
    padding: 8px 12px;
    color: #555b72;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    transition: .2s ease;
}

.nav a:hover,
.navlinks a:hover {
    color: var(--primary);
    background: #f0ecff;
}

/* ==========================================
   HOMEPAGE HERO
========================================== */

.hero {
    width: 92%;
    max-width: 1250px;
    margin: 28px auto 0;
    padding: 65px 24px;
    text-align: center;
    color: #fff;
    border-radius: 26px;
    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(255,255,255,.2),
            transparent 25%
        ),
        linear-gradient(135deg, #5434d6, #8746ef 55%, #ec4fa7);
    box-shadow: 0 18px 45px rgba(112,72,255,.18);
    overflow: hidden;
}

.hero-tag {
    display: inline-block;
    padding: 7px 14px;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 30px;
    background: rgba(255,255,255,.12);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
}

.hero h1 {
    margin: 20px 0 15px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -1.4px;
}

.hero h1 span {
    color: #ffe66d;
}

.hero p,
.hero .intro {
    max-width: 760px;
    margin: 0 auto 24px;
    color: rgba(255,255,255,.94);
    font-size: 16px;
}

/* Both homepage and older search class names */

#searchBox,
.search,
.hero input[type="search"] {
    display: block;
    width: min(100%, 500px);
    margin: 18px auto;
    padding: 14px 17px;
    border: 2px solid #e4e1f7;
    border-radius: 13px;
    outline: none;
    background: #fff;
    color: #191a2e;
}

#searchBox:focus,
.search:focus {
    border-color: #ffe66d;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* ==========================================
   BUTTONS
========================================== */

.btn {
    display: inline-block;
    padding: 12px 19px;
    border: 0;
    border-radius: 11px;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    text-align: center;
    transition: transform .2s, filter .2s;
    cursor: pointer;
}

.btn:hover {
    color: #fff;
    filter: brightness(1.08);
    transform: translateY(-2px);
}

.btn.primary {
    background: #ffe66d;
    color: #30215e;
}

.btn.secondary {
    background: #ebe7ff;
    color: #4930a0;
}

.hero .btn.secondary {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.5);
    color: #fff;
}

.btnrow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* ==========================================
   SECTIONS
========================================== */

.section {
    width: 90%;
    max-width: 1250px;
    margin: 60px auto;
    padding: 0;
}

.section-heading {
    margin-bottom: 24px;
}

.section h2,
.section-heading h2 {
    margin: 0 0 8px;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.3;
    font-weight: 900;
}

.section-heading p,
.section > p {
    color: var(--muted);
}

.muted {
    color: var(--muted);
}

/* ==========================================
   GAME AND TOOL CARDS
========================================== */

.card-grid,
.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 22px;
}

.card,
.tile {
    display: block;
    min-width: 0;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 19px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.card:hover,
.tile:hover {
    transform: translateY(-5px);
    border-color: #c4b5fd;
    box-shadow: 0 16px 34px rgba(70,45,140,.12);
    color: var(--text);
}

.card-icon,
.emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eee9ff, #ffe7f4);
    font-size: 30px;
}

.card h3,
.tile h3 {
    margin: 6px 0 9px;
    color: var(--text);
    font-size: 19px;
    font-weight: 850;
}

.card p,
.tile p {
    margin: 0 0 17px;
    color: var(--muted);
    font-size: 14px;
}

.card-link {
    color: var(--primary);
    font-weight: 800;
    font-size: 14px;
}

.card-link:hover {
    color: var(--secondary);
}

.tools-section {
    padding: 32px;
    border: 1px solid #e4defe;
    border-radius: 26px;
    background: #efedff;
}

.tools-section .card {
    box-shadow: 0 5px 18px rgba(40,30,90,.05);
}

/* ==========================================
   INNER GAME AND TOOL PAGES
========================================== */

.page-container,
.panel {
    width: 92%;
    max-width: 850px;
    margin: 35px auto 55px;
    padding: clamp(22px, 4vw, 40px);
    border: 1px solid var(--border);
    border-radius: 23px;
    background: #fff;
    box-shadow: var(--shadow);
}

.panel h1,
.page-container h1 {
    margin: 8px 0 15px;
    color: var(--text);
    font-size: clamp(30px, 5vw, 43px);
    line-height: 1.2;
    font-weight: 900;
}

.panel h2,
.page-container h2 {
    margin-top: 30px;
    color: var(--text);
    font-size: 24px;
}

.panel h3,
.page-container h3 {
    color: var(--text);
}

.panel p,
.page-container p {
    color: var(--muted);
}

.panel .lead,
.lead {
    margin-bottom: 20px;
    color: #596078;
    font-size: 16px;
}

.crumb {
    margin-bottom: 18px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ==========================================
   TOOL INPUTS AND GAME CONTROLS
========================================== */

.toolbox {
    display: grid;
    gap: 15px;
    margin: 24px 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: #f8f7ff;
}

.toolbox label,
.tool-area label {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-weight: 700;
}

.toolbox input,
.toolbox textarea,
.toolbox select,
.tool-area input,
.tool-area textarea,
.tool-area select {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #d8d8e9;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: #191a2e;
}

.toolbox input:focus,
.toolbox textarea:focus,
.toolbox select:focus,
.tool-area input:focus,
.tool-area textarea:focus,
.tool-area select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(112,72,255,.1);
}

.toolbox button,
.tool-area button,
.game-area button {
    margin: 4px 5px 4px 0;
    padding: 11px 17px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.toolbox button:hover,
.tool-area button:hover,
.game-area button:hover {
    filter: brightness(1.1);
}

.game-area,
.tool-area {
    margin-top: 22px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #f8f7ff;
}

/* Game stage */

.game-stage {
    display: grid;
    min-height: 220px;
    place-items: center;
    gap: 15px;
    padding: 25px;
    border: 1px solid #e3defa;
    border-radius: 17px;
    background: linear-gradient(135deg, #f5f2ff, #fff2fa);
    text-align: center;
}

.big-number {
    color: var(--primary);
    font-size: clamp(42px, 8vw, 70px);
    font-weight: 900;
}

.tap-target {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border: 0;
    border-radius: 50%;
    background: #ff7a45;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

/* Result box */

.output,
.result {
    min-height: 55px;
    margin-top: 14px;
    padding: 17px;
    border: 1px solid #ded8ff;
    border-radius: 13px;
    background: #eeeaff;
    color: #30215e;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.hidden {
    display: none !important;
}

/* ==========================================
   CONTENT, ABOUT AND LEGAL PAGES
========================================== */

.content {
    margin-top: 30px;
}

.content h2 {
    margin-top: 26px;
}

.content p,
.content li {
    color: #596078;
}

.content ul,
.content ol {
    padding-left: 24px;
}

.about-section {
    width: 90%;
    max-width: 1000px;
    margin: 65px auto;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
}

.about-section h2 {
    margin-top: 0;
    font-size: 29px;
}

.about-section p {
    color: var(--muted);
}

/* ==========================================
   FOOTER
========================================== */

.footer {
    margin-top: 65px;
    padding: 30px 0;
    border-top: 1px solid #302a4d;
    background: var(--dark);
    color: #dedbf0;
}

.footerrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer a,
.footer-links a {
    color: #fff;
    font-size: 13px;
}

.footer a:hover,
.footer-links a:hover {
    color: #ffe66d;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.footer p {
    margin: 0 0 12px;
}

/* ==========================================
   MOBILE AND TABLET RESPONSIVE
========================================== */

@media (max-width: 900px) {
    .card-grid,
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .header {
        padding-left: 4%;
        padding-right: 4%;
    }

    .nav,
    .navlinks {
        gap: 4px;
    }

    .nav a,
    .navlinks a {
        padding: 8px;
        font-size: 13px;
    }

    .hero {
        padding: 55px 20px;
    }
}

@media (max-width: 600px) {
    .header {
        position: relative;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 15px 5%;
    }

    .top .nav {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 0;
        gap: 10px;
    }

    .nav,
    .navlinks {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 4px;
    }

    .nav a,
    .navlinks a {
        padding: 7px 9px;
        font-size: 12px;
    }

    .logo,
    .brand {
        font-size: 24px;
    }

    .hero {
        width: 92%;
        margin-top: 18px;
        padding: 42px 17px;
        border-radius: 20px;
    }

    .hero h1 {
        font-size: 34px;
        letter-spacing: -.8px;
    }

    .hero p {
        font-size: 15px;
    }

    .section {
        margin: 42px auto;
    }

    .card-grid,
    .grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .card,
    .tile {
        padding: 21px;
    }

    .tools-section {
        padding: 18px;
        border-radius: 20px;
    }

    .about-section {
        padding: 22px;
    }

    .panel,
    .page-container {
        width: 92%;
        margin-top: 20px;
        padding: 21px;
        border-radius: 18px;
    }

    .toolbox {
        padding: 16px;
    }

    .game-stage {
        padding: 17px;
    }

    .footerrow {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Corrected readable game/tool page text and controls */
.game-stage h1, .game-stage h2, .game-stage h3,
.game-area h1, .game-area h2, .game-area h3,
.game-container h1, .game-container h2, .game-container h3,
.game-panel h1, .game-panel h2, .game-panel h3,
.tool-area h1, .tool-area h2, .tool-area h3,
.toolbox h1, .toolbox h2, .toolbox h3 {
    color: var(--text, #191a2e);
}
.game-stage, .game-area, .game-container, .game-panel,
.tool-area, .toolbox {
    color: var(--text, #191a2e);
}
