@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

:root {
    --bg-dark: #0f172a;
    --bg-glass: rgba(30, 41, 59, 0.7);
    --border-glass: rgba(255, 255, 255, 0.1);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #8b5cf6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --font-family: 'Outfit', sans-serif;
}

/* Standalone tool workspace */
.standalone-shell {
    width: min(90vw, 1600px);
    margin: 0 auto 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.standalone-toolbar {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.standalone-toolbar p {
    margin-bottom: 0;
}

.standalone-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.standalone-frame-card {
    padding: 0.85rem;
    overflow: hidden;
}

.standalone-project-frame {
    width: 100%;
    height: calc(100vh - 235px);
    min-height: 78vh;
    border: 0;
    border-radius: 14px;
    background: #fff;
    display: block;
}

@media (max-width: 900px) {
    .standalone-shell {
        width: calc(100vw - 1.5rem);
        margin-bottom: 1.5rem;
    }

    .standalone-frame-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .standalone-project-frame {
        min-width: 900px;
    }

    .standalone-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .standalone-toolbar-actions {
        justify-content: stretch;
    }

    .standalone-toolbar-actions .btn {
        flex: 1 1 180px;
        width: auto;
    }

    .standalone-project-frame {
        height: calc(100vh - 280px);
        min-height: 400px;
    }
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
}

#app {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Typography */
h1, h2, h3 { font-weight: 600; margin-bottom: 0.5rem; }
h1 { font-size: 2.5rem; background: -webkit-linear-gradient(45deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
p { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.5; }

/* Components */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-card {
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-group input, .input-group select, .input-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-main);
    font-family: var(--font-family);
    transition: all 0.3s ease;
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: var(--font-family);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
}

.link {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
    font-size: 0.9rem;
}
.link:hover { text-decoration: underline; }

/* Dashboard layout */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

.nav-brand { font-size: 1.5rem; font-weight: 800; display:flex; align-items:center; gap: 10px;}
.nav-links { display: flex; gap: 1rem; align-items: center;}
.nav-links .btn { width: auto; }
.wallet-badge {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    padding: 1.5rem;
    transition: transform 0.3s ease;
}
.card:hover { transform: translateY(-5px); }

/* Loader */
.loader-wrapper {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.loader-wrapper.active { opacity: 1; pointer-events: all; }

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 10000;
}
.toast {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Custom file upload */
input[type="file"] {
    padding: 0.5rem;
}
input[type="file"]::file-selector-button {
    border: 1px solid var(--border-glass);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background: var(--bg-glass);
    color: var(--text-main);
    cursor: pointer;
    transition: 0.3s;
}
input[type="file"]::file-selector-button:hover { background: rgba(255,255,255,0.1); }

/* Exam Reports theme */
.exam-ui {
    --bg: #F4F3EF;
    --surface: #FFFFFF;
    --border: #DDD9D0;
    --border-md: #C8C3B8;
    --text: #1A1916;
    --muted: #6B6760;
    --accent: #1D3557;
    --accent-lt: #E8EEF5;
    --success: #1A6640;
    --success-lt: #E6F4EC;
    --warn: #7A4E00;
    --warn-lt: #FFF3CD;
    --danger: #8B1D1D;
    --danger-lt: #FDECEA;
    --info: #1D5288;
    --info-lt: #E6EFF8;
    --mark-red: #FDDEDE;
    --mark-zero: #FFF3CD;
    --mark-green: #D6F0E0;
    --rank-ab: #C05000;
    --radius: 6px;
    --radius-lg: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --font-family: 'DM Sans', sans-serif;
    --mono-font: 'DM Mono', monospace;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    font-family: var(--font-family);
}

.exam-ui,
.exam-ui button,
.exam-ui input,
.exam-ui select,
.exam-ui textarea {
    font-family: var(--font-family);
}

.exam-ui h1,
.exam-ui h2,
.exam-ui h3 {
    color: var(--text);
    background: none;
    -webkit-text-fill-color: initial;
}

.exam-ui p {
    color: var(--muted);
}

.exam-ui a {
    color: var(--accent);
}

.exam-ui .page-wrap {
    display: flex;
    min-height: 100vh;
}

.exam-ui .sidebar {
    width: 220px;
    background: var(--accent);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.exam-ui .sidebar-logo {
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.exam-ui .sidebar-logo h1 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1.3;
    color: #fff;
    margin: 0;
}

.exam-ui .sidebar-logo span {
    font-size: 11px;
    opacity: .55;
    display: block;
    margin-top: 2px;
    font-weight: 300;
}

.exam-ui .sidebar-section {
    padding: 18px 20px 6px;
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .4;
    font-weight: 500;
}

.exam-ui .sidebar-nav {
    padding: 12px 0;
}

.exam-ui .sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    color: rgba(255,255,255,.7);
    font-size: 13.5px;
    font-weight: 400;
    transition: background .15s, color .15s;
    text-decoration: none;
}

.exam-ui .sidebar-nav a:hover,
.exam-ui .sidebar-nav a.active {
    background: rgba(255,255,255,.1);
    color: #fff;
}

.exam-ui .main {
    flex: 1;
    padding: 32px 36px;
    min-width: 0;
    overflow-x: auto;
}

.exam-ui .page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.exam-ui .page-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px;
}

.exam-ui .card,
.exam-ui .glass {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.exam-ui .card + .card {
    margin-top: 16px;
}

.exam-ui .card-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}

.exam-ui .alert {
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.exam-ui .alert-warn {
    background: var(--warn-lt);
    color: var(--warn);
    border: 1px solid #E8CC80;
}

.exam-ui .alert-success {
    background: var(--success-lt);
    color: var(--success);
    border: 1px solid #A8D8BC;
}

.exam-ui .alert-info {
    background: var(--info-lt);
    color: var(--info);
    border: 1px solid #AACAED;
}

.exam-ui .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.exam-ui .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.exam-ui .form-group,
.exam-ui .input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 0;
}

.exam-ui .form-group label,
.exam-ui .input-group label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
    display: block;
    margin-bottom: 0;
}

.exam-ui .form-group input,
.exam-ui .form-group select,
.exam-ui .form-group textarea,
.exam-ui .input-group input,
.exam-ui .input-group select,
.exam-ui .input-group textarea {
    width: 100%;
    min-width: 140px;
    font-size: 13.5px;
    padding: 7px 10px;
    border: 1px solid var(--border-md);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    box-shadow: none;
}

.exam-ui .form-group input:focus,
.exam-ui .form-group select:focus,
.exam-ui .form-group textarea:focus,
.exam-ui .input-group input:focus,
.exam-ui .input-group select:focus,
.exam-ui .input-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(29,53,87,.12);
}

.exam-ui .btn {
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background .15s, border-color .15s, transform .1s;
    box-shadow: none;
}

.exam-ui .btn:hover {
    transform: none;
    box-shadow: none;
    background: #162b44;
}

.exam-ui .btn:active {
    transform: scale(.98);
}

.exam-ui .btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--border-md);
}

.exam-ui .btn-outline:hover {
    background: var(--accent-lt);
    border-color: var(--accent);
    color: var(--accent);
}

.exam-ui .btn-success {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.exam-ui .btn-success:hover {
    background: #145233;
}

.exam-ui .btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.exam-ui .mono-text {
    font-family: var(--mono-font);
}

.exam-ui .badge-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-lt);
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
}

.exam-ui .card-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

.exam-ui .exam-report-info-box {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
}

.exam-ui .exam-report-subject-panel {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #FAF9F7;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.exam-ui .settings-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 24px;
}

.exam-ui .search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.exam-ui .search-input {
    flex: 1;
    max-width: 280px;
    padding: 7px 12px 7px 32px;
    font-size: 13px;
    border: 1px solid var(--border-md);
    border-radius: var(--radius);
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B6760' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 10px center;
    color: var(--text);
    outline: none;
}

.exam-ui .search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(29,53,87,.1);
}

.exam-ui .summary-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 14px 20px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    font-size: 13px;
    box-shadow: none;
}

.exam-ui .summary-bar span {
    opacity: .7;
    margin-right: 4px;
}

.exam-ui .summary-bar strong {
    font-weight: 600;
}

.exam-ui .legend {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 12px;
    color: var(--muted);
    flex-wrap: wrap;
}

.exam-ui .legend-pill {
    display: flex;
    align-items: center;
    gap: 5px;
}

.exam-ui .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

.exam-ui .table-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.exam-ui .toolbar-group {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.exam-ui .toolbar-label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-right: 2px;
}

.exam-ui .toolbar-divider {
    width: 1px;
    height: 18px;
    background: var(--border-md);
    margin: 0 2px;
}

.exam-ui .inline-edit-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.exam-ui .inline-edit-input {
    width: 72px;
    font-size: 12px;
    padding: 3px 6px;
    border: 1px dashed var(--border-md);
    border-radius: 4px;
    font-family: var(--mono-font);
    background: var(--bg);
    color: var(--text);
}

.exam-ui .summary-bar .inline-edit-input {
    background: rgba(255,255,255,.12);
    color: #fff;
    border-color: rgba(255,255,255,.3);
}

.exam-ui .table-container {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: auto;
    max-height: 600px;
    background: var(--surface);
    position: relative;
}

.exam-ui .result-table,
.exam-ui .exam-report-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 13px;
}

.exam-ui .result-table th,
.exam-ui .result-table td,
.exam-ui .exam-report-table th,
.exam-ui .exam-report-table td {
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    padding: 6px 10px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    text-align: center;
    vertical-align: middle;
}

.exam-ui .result-table th:last-child,
.exam-ui .result-table td:last-child,
.exam-ui .exam-report-table th:last-child,
.exam-ui .exam-report-table td:last-child {
    border-right: none;
}

.exam-ui .result-table tbody tr:last-child td,
.exam-ui .exam-report-table tbody tr:last-child td {
    border-bottom: none;
}

.exam-ui .result-table th,
.exam-ui .exam-report-table th {
    background: #F0EEE8;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
    position: sticky;
    top: 0;
    z-index: 10;
    overflow: visible;
}

.exam-ui .th-content {
    display: block;
    overflow: hidden;
    word-break: break-word;
    white-space: normal;
    line-height: 1.3;
}

.exam-ui .result-table tbody tr:hover td,
.exam-ui .exam-report-table tbody tr:hover td {
    background: #FAF9F7 !important;
}

.exam-ui .col-sno {
    position: sticky;
    left: 0;
    z-index: 5;
}

.exam-ui .col-name {
    position: sticky;
    left: 0;
    z-index: 5;
    text-align: left !important;
}

.exam-ui thead .col-sno,
.exam-ui thead .col-name {
    z-index: 20;
    background: #E8E6DF;
}

.exam-ui tbody .col-sno,
.exam-ui tbody .col-name {
    background: var(--surface);
}

.exam-ui .max-mark-badge {
    display: block;
    font-size: 9.5px;
    font-weight: 400;
    color: var(--muted);
    margin-top: 2px;
    letter-spacing: 0;
    text-transform: none;
}

.exam-ui .fallback-badge {
    display: block;
    font-size: 9px;
    color: var(--warn);
    font-weight: 500;
}

.exam-ui .rank-ab {
    color: var(--rank-ab) !important;
    font-weight: 700;
}

.exam-ui .print-header {
    display: none;
}

.exam-ui .print-title-row {
    display: grid;
    grid-template-columns: 1fr 1.8fr auto;
    align-items: end;
    gap: 18pt;
    margin: 0 0 10pt;
    color: #000;
}

.exam-ui .print-title-left,
.exam-ui .print-title-center,
.exam-ui .print-title-right {
    font-size: 24pt;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.1;
    color: #000;
}

.exam-ui .print-title-left {
    text-align: left;
    white-space: nowrap;
}

.exam-ui .print-title-center {
    text-align: center;
}

.exam-ui .print-title-right {
    text-align: right;
    white-space: nowrap;
}

.exam-ui .print-meta {
    display: flex;
    justify-content: center;
    gap: 26pt;
    font-size: 10.5pt;
    color: #333;
    margin-bottom: 10pt;
    flex-wrap: wrap;
}

.exam-ui .print-meta strong {
    color: #000;
    font-weight: 700;
}

.exam-ui .print-rule {
    border: none;
    border-top: 2.5pt solid #000;
    margin: 6pt 0 12pt;
}

@media (max-width: 980px) {
    .exam-ui .page-wrap {
        display: block;
    }

    .exam-ui .sidebar {
        position: static;
        width: 100%;
        height: auto;
    }

    .exam-ui .main {
        padding: 24px 20px;
    }

    .exam-ui .settings-grid,
    .exam-ui .exam-report-home-grid {
        grid-template-columns: 1fr !important;
    }

    .exam-ui .exam-report-home-stats,
    .exam-ui .exam-report-filter-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 640px) {
    .exam-ui .main {
        padding: 18px 14px;
    }

    .exam-ui .exam-report-home-stats,
    .exam-ui .exam-report-filter-grid {
        grid-template-columns: 1fr !important;
    }

    .exam-ui .print-title-row {
        grid-template-columns: 1fr !important;
        gap: 8pt;
    }

    .exam-ui .print-title-left,
    .exam-ui .print-title-center,
    .exam-ui .print-title-right {
        text-align: center;
        font-size: 18pt;
    }
}

@media print {
    .exam-ui .sidebar,
    .exam-ui .no-print,
    .exam-ui .table-toolbar,
    .exam-ui .summary-bar,
    .exam-ui .card.alert,
    .exam-ui .alert {
        display: none !important;
    }

    @page {
        size: landscape;
        margin: 10mm 8mm;
    }

    .exam-ui,
    html,
    body {
        margin: 0;
        padding: 0;
        background: #fff !important;
    }

    .exam-ui .page-wrap {
        display: block;
    }

    .exam-ui .main {
        padding: 0;
        overflow: visible;
    }

    .exam-ui .print-header {
        display: block !important;
        margin-bottom: 10px;
    }

    .exam-ui .table-container {
        max-height: none !important;
        overflow: visible !important;
        border: none !important;
        border-radius: 0 !important;
        width: 100% !important;
    }

    .exam-ui .result-table,
    .exam-ui .exam-report-table {
        width: 100% !important;
        table-layout: auto !important;
        font-size: 9pt !important;
        border-collapse: collapse !important;
    }

    .exam-ui .result-table th,
    .exam-ui .result-table td,
    .exam-ui .exam-report-table th,
    .exam-ui .exam-report-table td {
        padding: 4px 5px !important;
        white-space: normal !important;
        word-break: break-word !important;
        overflow: visible !important;
        border: 1px solid #999 !important;
        font-size: 9pt !important;
    }

    .exam-ui .result-table th,
    .exam-ui .exam-report-table th,
    .exam-ui .col-sno,
    .exam-ui .col-name {
        position: static !important;
        left: auto !important;
        top: auto !important;
        z-index: auto !important;
    }

    .exam-ui .result-table thead th,
    .exam-ui .exam-report-table thead th {
        background: #E8E6DF !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .exam-ui thead {
        display: table-header-group;
    }

    .exam-ui tbody {
        display: table-row-group;
    }

    .exam-ui tr {
        page-break-inside: avoid;
    }
}
/* ── Footer ── */
.footer {
    margin-top: 4rem;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.footer-links {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

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

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

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ── Content Pages (About, Contact, FAQ, etc.) ── */
.info-content-wrapper {
    max-width: 900px;
    margin: 2rem auto;
    width: 100%;
    padding: 0 1rem;
}

.info-card {
    padding: 3rem;
}

.info-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.info-header h1 {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.info-header p {
    font-size: 1.2rem;
}

.info-section {
    margin-bottom: 3rem;
}

.info-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--primary);
}

.info-section p, .info-section li {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.info-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
}

.info-item h4 {
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.faq-item {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 1.5rem;
}

.faq-question {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.faq-answer {
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .info-card {
        padding: 2rem 1.5rem;
    }
    .info-header h1 {
        font-size: 2.2rem;
    }
}

/* ============================================================
   BILLING / SUBSCRIPTION STYLES
   ============================================================ */

/* Duration Tabs */
.billing-duration-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}
.dur-tab {
    padding: 0.55rem 1.25rem;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}
.dur-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.dur-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(59,130,246,0.35);
}

/* Plan Cards Grid */
.billing-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1rem;
}
@media (max-width: 768px) {
    .billing-plans-grid { grid-template-columns: 1fr; }
}

/* Individual Plan Card */
.billing-plan-card {
    position: relative;
    padding: 2rem 1.5rem;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: visible;
    --plan-color: var(--primary);
}
.billing-plan-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 0 1px var(--plan-color);
}
.billing-plan-featured {
    border-color: var(--plan-color) !important;
    box-shadow: 0 0 0 2px var(--plan-color), 0 8px 30px rgba(0,0,0,0.2);
}

/* Badge (Most Popular) */
.billing-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* Price Display */
.billing-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0.5rem 0 0.25rem;
    background: -webkit-linear-gradient(45deg, var(--plan-color), white);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Tokens Pill */
.billing-tokens-pill {
    display: inline-block;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 30px;
    padding: 0.4rem 1.1rem;
    font-size: 0.85rem;
    color: var(--text-main);
}

.billing-plan-btn { transition: opacity 0.2s; }
.billing-plan-btn-active { opacity: 0.7; cursor: default; }

/* ============================================================
   CHECKOUT MODAL / OVERLAY
   ============================================================ */
.checkout-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: 1rem;
}
.checkout-overlay.visible { opacity: 1; }

.checkout-modal {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    border-radius: 24px;
    position: relative;
    animation: slideUp 0.3s ease;
    max-height: 95vh;
    overflow-y: auto;
}
@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.checkout-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--text-main);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.checkout-close:hover { background: rgba(255,255,255,0.2); }

/* Pay Button */
.checkout-pay-btn {
    width: 100%;
    padding: 0.9rem;
    font-size: 1.05rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.checkout-pay-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59,130,246,0.4);
}
.checkout-pay-btn:disabled { opacity: 0.7; cursor: wait; }

/* Spinner inside button */
.checkout-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   3D CREDIT CARD
   ============================================================ */
.credit-card-scene {
    perspective: 800px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto 1.5rem;
    height: 160px;
}
.credit-card {
    width: 100%;
    height: 160px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
    border-radius: 16px;
    cursor: default;
}
.credit-card.flipped { transform: rotateY(180deg); }

.credit-card-front,
.credit-card-back {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.credit-card-front {
    background: linear-gradient(135deg, #1e3a5f, #3b82f6, #8b5cf6);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.credit-card-back {
    background: linear-gradient(135deg, #1e3a5f, #1e293b);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.card-magnetic-strip {
    height: 36px;
    background: #000;
    margin: 0 -1.5rem;
    width: calc(100% + 3rem);
}
.card-cvv-area {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* ============================================================
   ADMIN BILLING TABLE
   ============================================================ */
.billing-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.billing-admin-table th,
.billing-admin-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    text-align: center;
    vertical-align: top;
}
.billing-admin-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.billing-admin-table td:first-child {
    text-align: left;
    white-space: nowrap;
}

.billing-admin-input {
    width: 75px;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
    font-size: 0.8rem;
    font-family: var(--font-family);
    text-align: center;
    transition: border-color 0.2s;
}
.billing-admin-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============================================================
   CONFETTI ANIMATION
   ============================================================ */
@keyframes confettiFall {
    0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
    80%  { opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ============================================================
   NAVBAR PROFILE CHIP
   ============================================================ */

.nav-profile-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 40px;
    padding: 0.3rem 0.75rem 0.3rem 0.3rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    line-height: 1;
}
.nav-profile-chip:hover {
    background: rgba(255,255,255,0.13);
    border-color: var(--primary);
    transform: scale(1.03);
}
.nav-profile-chip:active { transform: scale(0.97); }

/* Avatar circle inside chip */
.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}
.nav-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.nav-avatar-initials {
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.nav-profile-name {
    max-width: 90px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */

/* Hero banner */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem 2.5rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}
.profile-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(139,92,246,0.08));
    pointer-events: none;
}
@media (max-width: 600px) {
    .profile-hero { flex-direction: column; text-align: center; padding: 1.5rem; }
}

/* Big avatar */
.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.profile-big-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    object-fit: cover;
    display: block;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.2);
}
.profile-big-initials {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    border: 3px solid var(--primary);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.2);
}
.profile-online-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--success);
    border: 2px solid var(--bg-card);
    box-shadow: 0 0 6px var(--success);
    animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 6px var(--success); }
    50%       { box-shadow: 0 0 14px var(--success); }
}

/* Hero text */
.profile-display-name {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}
.profile-email {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}
.profile-admin-badge {
    display: inline-block;
    background: rgba(139,92,246,0.18);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 20px;
    padding: 0.25rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    margin-right: 0.5rem;
}
.profile-sub-pill {
    display: inline-block;
    border: 1px solid;
    border-radius: 20px;
    padding: 0.3rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Stats row */
.profile-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 500px) { .profile-stats-row { grid-template-columns: 1fr 1fr; } }

.profile-stat-card {
    padding: 1.25rem 1rem;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.profile-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.profile-stat-icon  { font-size: 1.5rem; margin-bottom: 0.5rem; }
.profile-stat-value { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.2rem; }
.profile-stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Account info rows */
.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    gap: 1rem;
}
.profile-info-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
    width: 130px;
}
.profile-info-value {
    font-size: 0.9rem;
    text-align: right;
    word-break: break-all;
}

/* Actions row */
.profile-actions-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0;
}
.profile-action-btn {
    flex: 1 1 auto;
    min-width: 140px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Logout button */
.profile-logout-btn {
    background: rgba(239,68,68,0.12);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 0.7rem 2.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    gap: 0.5rem;
    transition: background 0.2s, transform 0.15s;
}
.profile-logout-btn:hover {
    background: rgba(239,68,68,0.22);
    transform: translateY(-2px);
}

/* ============================================================
   MINE TOKENS PAGE
   ============================================================ */

.mine-page-hero {
    text-align: center;
    padding: 2rem 1rem 1rem;
    margin-bottom: 2rem;
}
.mine-page-hero h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #f59e0b, #f97316, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}
.mine-page-hero p {
    font-size: 1.05rem;
    color: var(--text-muted);
}

.mine-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.mine-stat-card {
    padding: 1.25rem;
    text-align: center;
    border-radius: 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(12px);
}
.mine-stat-icon { font-size: 2rem; margin-bottom: 0.4rem; }
.mine-stat-value { font-size: 1.8rem; font-weight: 700; color: white; }
.mine-stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.tasks-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.task-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.task-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(249,115,22,0.1));
    transition: opacity 0.2s;
    border-radius: inherit;
    pointer-events: none;
}
.task-card:hover::before { opacity: 1; }
.task-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(245,158,11,0.15); }

.task-card.completed {
    border-color: rgba(16,185,129,0.4);
    background: rgba(16,185,129,0.06);
    cursor: default;
}
.task-card.completed:hover { transform: none; box-shadow: none; }
.task-card.completed:hover::before { opacity: 0; }

.task-emoji {
    font-size: 2.2rem;
    flex-shrink: 0;
    width: 48px;
    text-align: center;
}
.task-info { flex: 1; min-width: 0; }
.task-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.2rem;
}
.task-desc { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.task-type-badge {
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    color: var(--text-muted);
    margin-top: 0.3rem;
    display: inline-block;
}
.task-reward-badge {
    background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(249,115,22,0.2));
    border: 1px solid rgba(245,158,11,0.35);
    color: #f59e0b;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
.task-done-check {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.mine-map-cta {
    border: 2px dashed rgba(139,92,246,0.4);
    border-radius: 18px;
    padding: 2rem;
    text-align: center;
    background: rgba(139,92,246,0.06);
    margin-bottom: 2rem;
    transition: border-color 0.2s, background 0.2s;
}
.mine-map-cta:hover {
    border-color: rgba(139,92,246,0.7);
    background: rgba(139,92,246,0.1);
}
.mine-map-cta h2 {
    font-size: 1.4rem;
    color: white;
    margin-bottom: 0.5rem;
}

/* ============================================================
   2D MINER MAP
   ============================================================ */

.miner-map-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 3rem;
}

.miner-map-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    backdrop-filter: blur(12px);
}
.miner-map-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.miner-map-tokens {
    font-size: 1.1rem;
    font-weight: 600;
    color: #10b981;
    background: rgba(16,185,129,0.12);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(16,185,129,0.25);
}

.miner-map-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.25rem;
    align-items: start;
}

.miner-map-wrap {
    background: radial-gradient(ellipse at center, #1a2d1a 0%, #0d1f0d 50%, #0a0f0a 100%);
    border: 1px solid rgba(74,222,128,0.2);
    border-radius: 16px;
    padding: 1.25rem;
    position: relative;
    min-height: 400px;
    overflow: hidden;
}
.miner-map-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(74,222,128,0.04) 59px, rgba(74,222,128,0.04) 60px),
        repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(74,222,128,0.04) 59px, rgba(74,222,128,0.04) 60px);
    pointer-events: none;
    border-radius: inherit;
}

.miner-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    position: relative;
    z-index: 1;
}

.miner-tile {
    aspect-ratio: 1;
    border-radius: 8px;
    background: rgba(34,197,94,0.06);
    border: 1px solid rgba(34,197,94,0.12);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    overflow: hidden;
}
.miner-tile:hover {
    background: rgba(34,197,94,0.15);
    border-color: rgba(34,197,94,0.4);
    transform: scale(1.05);
    z-index: 2;
}
.miner-tile.has-miner {
    cursor: default;
    background: rgba(16,185,129,0.1);
    border-color: rgba(16,185,129,0.3);
}
.miner-tile.has-miner:hover { transform: none; }

/* Terrain variety */
.miner-tile:nth-child(3n)   { background: rgba(34,197,94,0.04); }
.miner-tile:nth-child(5n)   { background: rgba(16,185,129,0.08); }
.miner-tile:nth-child(7n)   { background: rgba(21,128,61,0.06); }
.miner-tile.has-miner:nth-child(3n),
.miner-tile.has-miner:nth-child(5n),
.miner-tile.has-miner:nth-child(7n) { background: rgba(16,185,129,0.1); }

.tile-empty-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(74,222,128,0.2);
}

.miner-unit {
    font-size: 1.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 100%;
    animation: minerBob 2s ease-in-out infinite;
    position: relative;
}
.miner-unit-emoji {
    font-size: 1.5rem;
    line-height: 1;
    animation: pickaxeSwing 1.2s ease-in-out infinite;
    transform-origin: bottom center;
}
.miner-unit-level {
    font-size: 0.5rem;
    font-weight: 700;
    color: #ffd700;
    background: rgba(0,0,0,0.5);
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1;
}
.miner-unit-rate {
    position: absolute;
    bottom: 2px;
    right: 3px;
    font-size: 0.45rem;
    color: rgba(16,185,129,0.9);
    font-weight: 600;
    line-height: 1;
}

@keyframes minerBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
@keyframes pickaxeSwing {
    0%, 100% { transform: rotate(-15deg); }
    50% { transform: rotate(15deg); }
}

/* Token float animation */
.token-float {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251,191,36,0.6);
    animation: tokenFloat 1.5s ease-out forwards;
}
@keyframes tokenFloat {
    0%   { opacity: 1; transform: translateY(0) scale(1); }
    60%  { opacity: 1; transform: translateY(-60px) scale(1.2); }
    100% { opacity: 0; transform: translateY(-100px) scale(0.8); }
}

/* Pending tokens counter badge */
.pending-tokens-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    animation: pendingPulse 2s ease-in-out infinite;
    z-index: 10;
    box-shadow: 0 0 12px rgba(245,158,11,0.4);
}
@keyframes pendingPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(245,158,11,0.4); }
    50% { box-shadow: 0 0 20px rgba(245,158,11,0.7); }
}

/* Collect button */
.collect-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: collectPulse 2.5s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}
.collect-btn::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: translateX(-100%) rotate(15deg);
    animation: collectShimmer 2.5s ease-in-out infinite;
}
@keyframes collectShimmer {
    0% { transform: translateX(-100%) rotate(15deg); }
    50%, 100% { transform: translateX(200%) rotate(15deg); }
}
.collect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245,158,11,0.5);
}
.collect-btn:active { transform: scale(0.98); }
@keyframes collectPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(245,158,11,0.3); }
    50% { box-shadow: 0 4px 25px rgba(245,158,11,0.6); }
}

/* Miner shop sidebar */
.miner-shop-panel {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    overflow: hidden;
    position: sticky;
    top: 1rem;
}
.miner-shop-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.miner-shop-list { padding: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }

.miner-shop-item {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.miner-shop-item:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.2);
    transform: translateX(3px);
}
.miner-shop-item.selected {
    border-color: rgba(245,158,11,0.5);
    background: rgba(245,158,11,0.08);
}
.miner-shop-emoji { font-size: 1.8rem; }
.miner-shop-info { flex: 1; min-width: 0; }
.miner-shop-name { font-size: 0.85rem; font-weight: 600; color: white; }
.miner-shop-desc { font-size: 0.7rem; color: var(--text-muted); margin: 0; }
.miner-shop-cost {
    font-size: 0.75rem;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245,158,11,0.12);
    padding: 0.2rem 0.55rem;
    border-radius: 10px;
    white-space: nowrap;
}

.miner-place-hint {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-glass);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    background: rgba(245,158,11,0.05);
}

.miner-owned-section { padding: 0.75rem; border-top: 1px solid var(--border-glass); }
.miner-owned-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.miner-owned-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-glass);
    margin-bottom: 0.4rem;
    font-size: 0.78rem;
}
.miner-owned-emoji { font-size: 1.2rem; }
.miner-owned-info { flex: 1; min-width: 0; }
.miner-owned-name { font-weight: 600; color: white; font-size: 0.8rem; }
.miner-owned-rate { color: #10b981; font-size: 0.7rem; }
.miner-upgrade-btn {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(139,92,246,0.4);
    background: rgba(139,92,246,0.1);
    color: #a78bfa;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    font-weight: 600;
}
.miner-upgrade-btn:hover { background: rgba(139,92,246,0.2); }
.miner-max-badge {
    font-size: 0.6rem;
    color: #fbbf24;
    background: rgba(251,191,36,0.12);
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(251,191,36,0.3);
    font-weight: 700;
}

.map-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}
.map-empty-state .big-emoji { font-size: 4rem; margin-bottom: 1rem; display: block; }

@media (max-width: 900px) {
    .miner-map-layout {
        grid-template-columns: 1fr;
    }
    .miner-shop-panel { position: static; }
    .miner-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}
@media (max-width: 600px) {
    .miner-grid { grid-template-columns: repeat(6, 1fr); }
    .tasks-grid { grid-template-columns: 1fr; }
}


/* ============================================================
   CLASH OF CLANS ISOMETRIC MAP
   ============================================================ */

/* Embedded CoC shell — sits below tasks */
.coc-shell {
    position: relative;
    height: 500px; /* Small area height */
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    background: #48484E;
    overflow: hidden;
    z-index: 10;
    font-family: 'Outfit', sans-serif;
    user-select: none;
}

/* ── TOP HUD ── */
.coc-hud-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
    backdrop-filter: blur(6px);
    border-bottom: 2px solid rgba(255,220,50,0.25);
    gap: 0.75rem;
    flex-shrink: 0;
    z-index: 10;
}

.coc-back-btn {
    background: rgba(0,0,0,0.45);
    border: 2px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.coc-back-btn:hover { background: rgba(0,0,0,0.65); }

.coc-resources {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.coc-res-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0,0,0,0.55);
    border: 2px solid rgba(255,210,50,0.5);
    border-radius: 24px;
    padding: 0.3rem 0.9rem 0.3rem 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #ffe066;
    min-width: 90px;
    box-shadow: 0 0 12px rgba(255,210,50,0.15);
}
.coc-res-pill.coc-res-pending {
    border-color: rgba(100,220,255,0.5);
    color: #7af0ff;
    box-shadow: 0 0 12px rgba(100,220,255,0.15);
}
.coc-res-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    image-rendering: pixelated;
    border-radius: 4px;
}
.coc-res-gem {
    font-size: 1.1rem;
    color: #7af0ff;
    text-shadow: 0 0 8px rgba(100,220,255,0.8);
}

.coc-collect-hud-btn {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.45rem 1.1rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    animation: collectGlow 2s ease-in-out infinite;
    white-space: nowrap;
}
.coc-collect-hud-btn:hover { transform: scale(1.07); box-shadow: 0 4px 16px rgba(245,158,11,0.6); }
.coc-collect-hud-btn:active { transform: scale(0.96); }
@keyframes collectGlow {
    0%,100% { box-shadow: 0 0 10px rgba(245,158,11,0.3); }
    50%      { box-shadow: 0 0 22px rgba(245,158,11,0.7); }
}

/* ── MAP VIEWPORT ── */
.coc-viewport {
    flex: 1;
    overflow: scroll;
    position: relative;
    cursor: grab;
    scrollbar-width: none;
}
.coc-viewport::-webkit-scrollbar { display: none; }
.coc-viewport:active { cursor: grabbing; }

/* The isometric world canvas */
.coc-iso-world {
    position: relative;
    /* Size set dynamically by JS */
    min-width: 900px;
    min-height: 500px;
}

/* ── ISO TILES ── */
#isoGrid, #isoBuildings {
    position: absolute;
    inset: 0;
}
#isoBuildings { pointer-events: none; }
#isoBuildings .iso-building { pointer-events: auto; }

.iso-tile {
    position: absolute;
    /* Diamond shape via clip-path */
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background: linear-gradient(145deg, #3ea852 0%, #2d8b40 50%, #1f6b2e 100%);
    transition: filter 0.15s, transform 0.1s;
    cursor: default;
}
.iso-tile-empty {
    cursor: pointer;
    background: linear-gradient(145deg, #4cba60 0%, #38a34a 50%, #27803a 100%);
}
.iso-tile-empty:hover {
    filter: brightness(1.3) drop-shadow(0 0 8px rgba(100,255,140,0.7));
    transform: translateY(-2px);
    z-index: 5;
}
.iso-tile-placing {
    filter: brightness(1.4) saturate(1.6);
    animation: tilePulse 1s ease-in-out infinite;
}
@keyframes tilePulse {
    0%,100% { filter: brightness(1.3) drop-shadow(0 0 6px rgba(100,255,140,0.5)); }
    50%      { filter: brightness(1.6) drop-shadow(0 0 14px rgba(100,255,140,0.9)); }
}
.iso-tile-occupied {
    background: linear-gradient(145deg, #2d7a3e 0%, #1f5a2c 50%, #163f1e 100%);
    cursor: default;
}

/* ── BUILDINGS ── */
.iso-building {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: grab;
    transition: filter 0.15s;
    z-index: 10;
    touch-action: none; /* Required for custom pointer drag on touch devices */
    user-select: none;
    -webkit-user-drag: none; /* Prevent native image drag */
}
.iso-building:hover { filter: brightness(1.15); z-index: 20; }
.iso-building:active { cursor: grabbing; }

.iso-bld-dragging {
    z-index: 999 !important;
    opacity: 0.8;
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.5)) brightness(1.2);
    transform: scale(1.05) translateY(-10px);
    transition: none !important;
}

.iso-bld-img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    image-rendering: pixelated;
    transition: filter 0.4s ease;
    filter: blur(8px);
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

/* Make the crystal miner appear larger */
.iso-bld-crystal .iso-bld-img {
    transform: scale(1.3);
    transform-origin: bottom center;
}

.iso-bld-anim {
    /* Animation removed to prevent zooming/scaling */
}


.iso-bld-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 1px 3px #000, 0 0 6px rgba(255,215,0,0.6);
    letter-spacing: 0.06em;
    margin-top: 2px;
    text-transform: uppercase;
}
.iso-bld-level {
    font-size: 0.58rem;
    font-weight: 800;
    color: #fff;
    background: rgba(0,0,0,0.7);
    padding: 1px 5px;
    border-radius: 8px;
    border: 1px solid rgba(255,215,0,0.4);
    margin-top: 1px;
}
.iso-bld-rate {
    font-size: 0.5rem;
    color: #6bff9e;
    font-weight: 600;
    text-shadow: 0 0 6px rgba(107,255,158,0.7);
}

/* Smoke puff animation on buildings */
.iso-smoke {
    position: absolute;
    top: 4px;
    right: 8px;
    width: 10px;
    height: 10px;
    background: rgba(200,200,200,0.7);
    border-radius: 50%;
    animation: smokePuff 2.5s ease-in-out infinite;
}
@keyframes smokePuff {
    0%   { transform: translateY(0) scale(0.5); opacity: 0.7; }
    50%  { transform: translateY(-12px) scale(1.2); opacity: 0.3; }
    100% { transform: translateY(-24px) scale(1.8); opacity: 0; }
}

/* ── PLACEMENT GHOST BANNER ── */
.coc-place-ghost {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.75);
    border: 2px solid rgba(255,215,0,0.6);
    border-radius: 24px;
    padding: 0.4rem 1.25rem;
    pointer-events: none;
    z-index: 50;
}
.ghost-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffd700;
    text-align: center;
}

/* ── BUILDING INFO POPUP ── */
.coc-info-popup {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(160deg, rgba(20,20,50,0.95), rgba(10,10,30,0.95));
    border: 2px solid rgba(255,215,0,0.45);
    border-radius: 18px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 60;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    min-width: 260px;
    animation: popupSlide 0.2s ease-out;
}
@keyframes popupSlide {
    from { transform: translateX(-50%) translateY(20px); opacity: 0; }
    to   { transform: translateX(-50%) translateY(0);   opacity: 1; }
}
.coc-info-img-wrap { flex-shrink: 0; }
.coc-info-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    image-rendering: pixelated;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    transition: filter 0.3s;
    filter: blur(4px);
}
.coc-info-body { flex: 1; min-width: 0; }
.coc-info-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 0.3rem;
}
.coc-info-stats { display: flex; gap: 0.75rem; margin-bottom: 0.4rem; }
.coc-stat { font-size: 0.8rem; color: #ccc; display: flex; align-items: center; gap: 3px; }
.coc-stat-icon { color: #ffd700; }
.coc-upgrade-popup-btn {
    flex: 1;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 0.35rem 0.6rem;
    cursor: pointer;
    transition: transform 0.15s;
}
.coc-upgrade-popup-btn:hover:not(:disabled) { transform: scale(1.04); }
.coc-close-popup-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #aaa;
    padding: 0.35rem 0.6rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.15s;
}
.coc-close-popup-btn:hover { background: rgba(255,255,255,0.15); }

/* ── BOTTOM BUILD TRAY ── */
.coc-build-tray {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 100%);
    border-top: 2px solid rgba(255,220,50,0.25);
    backdrop-filter: blur(8px);
    overflow-x: auto;
    flex-shrink: 0;
    scrollbar-width: none;
    z-index: 10;
}
.coc-build-tray::-webkit-scrollbar { display: none; }

.coc-tray-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: rgba(255,215,0,0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    flex-shrink: 0;
    padding: 0 2px;
}

.coc-tray-items {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex: 1;
}

.coc-tray-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 0.5rem 0.6rem;
    border-radius: 14px;
    border: 2px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.5);
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    min-width: 72px;
    flex-shrink: 0;
}
.coc-tray-item:hover {
    transform: translateY(-4px);
    border-color: rgba(255,215,0,0.5);
    box-shadow: 0 4px 16px rgba(255,215,0,0.2);
}
.coc-tray-selected {
    border-color: #ffd700 !important;
    background: rgba(255,215,0,0.12) !important;
    box-shadow: 0 0 20px rgba(255,215,0,0.4) !important;
    transform: translateY(-4px) scale(1.05) !important;
}
.coc-tray-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    image-rendering: pixelated;
    transition: filter 0.3s ease;
}
.coc-tray-name {
    font-size: 0.6rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 1.2;
}
.coc-tray-cost {
    font-size: 0.58rem;
    color: #7af0ff;
    font-weight: 600;
}

.coc-mine-tasks-btn {
    background: rgba(139,92,246,0.25);
    border: 2px solid rgba(139,92,246,0.5);
    border-radius: 12px;
    color: #a78bfa;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}
.coc-mine-tasks-btn:hover { background: rgba(139,92,246,0.4); transform: scale(1.04); }

/* ── FLOATERS & PARTICLES ── */
.coc-floater {
    position: absolute;
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255,215,0,0.8), 1px 1px 0 #000;
    pointer-events: none;
    z-index: 100;
    animation: cocFloat 1.4s ease-out forwards;
}
@keyframes cocFloat {
    0%   { opacity: 1; transform: translateY(0) scale(1); }
    60%  { opacity: 1; transform: translateY(-50px) scale(1.2); }
    100% { opacity: 0; transform: translateY(-90px) scale(0.7); }
}

.coc-star {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #ffd700, #f97316);
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
    animation: starBurst 0.7s ease-out forwards;
}
@keyframes starBurst {
    0%   { opacity: 1; transform: scale(0); }
    50%  { opacity: 1; transform: scale(1.5) translateY(-20px); }
    100% { opacity: 0; transform: scale(0.5) translateY(-40px); }
}

/* ── Prevent Mobile Save Image and Selection on Map elements ── */
.coc-shell img,
.coc-viewport img,
.iso-tile,
.iso-building,
.iso-bld-img {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -khtml-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    pointer-events: none; /* Make images click-through so parent div handles click/drag */
    -webkit-user-drag: none !important;
}

/* Allow pointer events only on interactive containers, not the raw images */
.iso-tile {
    pointer-events: auto !important;
}
.iso-building {
    pointer-events: auto !important;
}

/* Selected building outline/glow */
.iso-building.iso-bld-selected {
    filter: drop-shadow(0 0 10px var(--accent)) brightness(1.15) !important;
    transform: scale(1.05) translateY(-4px);
    transition: transform 0.2s ease, filter 0.2s ease;
}

/* ── Gmail-style Token Input ── */
.gmail-input-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.2);
    min-height: 42px;
    cursor: text;
    transition: all 0.3s ease;
}
.gmail-input-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.gmail-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    padding: 0.2rem 0.6rem 0.2rem 0.25rem;
    font-size: 0.85rem;
    color: var(--text-main);
    user-select: none;
}
.gmail-chip-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}
.gmail-chip-text {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gmail-chip-close {
    cursor: pointer;
    font-weight: bold;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}
.gmail-chip-close:hover {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Autocomplete Dropdown suggestions */
.autocomplete-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: #0f172a;
    padding: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    margin-top: 0.25rem;
}
.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.autocomplete-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
.autocomplete-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}
.autocomplete-info {
    display: flex;
    flex-direction: column;
}
.autocomplete-email {
    font-size: 0.85rem;
    color: var(--text-main);
    font-weight: 500;
}
.autocomplete-username {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Announcement Bar cursor typing animation */
@keyframes blink-cursor {
    from, to { border-color: transparent }
    50% { border-color: var(--accent) }
}
.typing-cursor {
    border-right: 2px solid var(--accent);
    animation: blink-cursor 0.75s step-end infinite;
}

/* --- Landing Page Styling --- */
.lp-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.lp-navbar .nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.lp-navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}
.lp-navbar .nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}
.lp-navbar .nav-links a:hover {
    color: var(--text-main);
}
.lp-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 5rem 2rem 3rem;
    position: relative;
    overflow: hidden;
}
.lp-hero-title {
    font-size: clamp(2.3rem, 5.5vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    max-width: 900px;
}
.lp-hero-subtitle {
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}
.lp-cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}
.lp-cta-group .btn {
    width: auto;
    min-width: 160px;
    padding: 0.85rem 1.75rem;
}
.lp-section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}
.lp-section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1rem;
    line-height: 1.5;
}
.lp-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}
.lp-tool-card {
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}
.lp-tool-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.1);
}
.lp-tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}
.lp-tool-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}
.lp-tool-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    flex-grow: 1;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.lp-tool-limit {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(139, 92, 246, 0.1);
    padding: 0.35rem 0.75rem;
    border-radius: 99px;
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.lp-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}
.lp-feature-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}
.lp-feature-item span {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    display: inline-block;
}
.lp-feature-item h4 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}
.lp-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 5rem;
}
.lp-price-card {
    padding: 2.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.4s;
    background: rgba(30, 41, 59, 0.4);
    position: relative;
}
.lp-price-card.popular {
    border: 2px solid var(--accent);
    background: rgba(30, 41, 59, 0.65);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.15);
}
.lp-popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.lp-price-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}
.lp-price-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}
.lp-price-value span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}
.lp-price-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-grow: 1;
}
.lp-price-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.lp-price-features li::before {
    content: "✓";
    color: var(--success);
    font-weight: bold;
}
.lp-mining-section {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 6rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem;
    border-radius: 20px;
}
.lp-mining-content {
    flex: 1.2;
}
.lp-mining-visual {
    flex: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 8rem;
    position: relative;
    user-select: none;
}
.lp-mining-visual::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 50%;
    filter: blur(40px);
    z-index: -1;
    animation: pulse 3s infinite alternate;
}
@media (max-width: 768px) {
    .lp-mining-section {
        flex-direction: column;
        padding: 2rem;
        text-align: center;
    }
    .lp-mining-visual {
        font-size: 6rem;
        margin-top: 1rem;
    }
    .lp-navbar {
        padding: 1rem;
    }
    .lp-navbar .nav-links {
        gap: 1rem;
    }
    .lp-navbar .nav-links a:not(.btn) {
        display: none;
    }
}


