/**
 * app.css — Custom styles for Number Typing Challenge
 * Works alongside Tailwind CSS CDN
 */

/* ─── Base ────────────────────────────────────────────────── */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

body {
    font-family: 'Nunito', sans-serif;
}

/* ─── Keypad Buttons ──────────────────────────────────────── */
.keypad-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    min-width: 48px;
    border-radius: 16px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #374151;
    background: white;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    cursor: pointer;
    user-select: none;
    transition: all 0.12s ease;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.keypad-btn:active,
.keypad-btn.keypad-pressed {
    transform: scale(0.92);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    background: #f3f4f6;
}

.keypad-delete {
    background: #fef3c7;
    border-color: #fde68a;
    color: #d97706;
    font-size: 1.3rem;
}
.keypad-delete:active,
.keypad-delete.keypad-pressed {
    background: #fde68a;
}

.keypad-submit {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #059669;
    color: white;
    font-size: 1.6rem;
}
.keypad-submit:active,
.keypad-submit.keypad-pressed {
    background: linear-gradient(135deg, #059669, #047857);
    transform: scale(0.92);
}

/* Large screens: bigger keypad */
@media (min-width: 640px) {
    .keypad-btn {
        height: 68px;
        font-size: 1.75rem;
        border-radius: 18px;
    }
}

/* ─── Floating Numbers Animation ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .floating-num,
    .animate-float,
    .animate-bounce-in,
    .animate-pulse-soft,
    .animate-slide-up,
    .animate-pop,
    .animate-shake {
        animation: none !important;
    }
}

/* ─── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ─── Input override (prevent mobile keyboard) ────────────── */
input[readonly],
input[inputmode="none"] {
    caret-color: transparent;
}

/* ─── Admin Styles ────────────────────────────────────────── */
.admin-sidebar a.active {
    background: #eff6ff;
    color: #3b82f6;
    font-weight: 700;
}

.admin-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #f3f4f6;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.admin-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #f3f4f6;
    background: #f9fafb;
    white-space: nowrap;
}
.admin-table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}
.admin-table tr:hover td {
    background: #f9fafb;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}
.admin-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.admin-btn:active {
    transform: translateY(0);
}
.admin-btn-primary {
    background: #3b82f6;
    color: white;
}
.admin-btn-danger {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}
.admin-btn-success {
    background: #d1fae5;
    color: #059669;
    border-color: #a7f3d0;
}

/* ─── Confetti override for reduced motion ────────────────── */
@media (prefers-reduced-motion: reduce) {
    #confetti-container * {
        animation: none !important;
        display: none !important;
    }
}
