body {
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    height: 100%;
    margin: 0;
    caret-color: #000000;
}

/* ── Force black cursor on all interactive/editable fields ── */
input[type="text"],
input[type="search"],
input[type="number"],
textarea,
[contenteditable="true"] {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='16'%3E%3Cpath d='M3 0h2v16H3zM0 0h8v2H0zM0 14h8v2H0z' fill='black'/%3E%3C/svg%3E") 4 8, text !important;
    caret-color: #000000 !important;
    color: #000000 !important;
}

/* Specifically ensure the I-beam (text) cursor is black */
input:hover,
input:focus,
textarea:hover,
textarea:focus,
input[type="text"]:hover,
input[type="text"]:focus {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='16'%3E%3Cpath d='M3 0h2v16H3zM0 0h8v2H0zM0 14h8v2H0z' fill='black'/%3E%3C/svg%3E") 4 8, text !important;
}

@keyframes shimmerGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.metallic-bg {
    background: linear-gradient(-45deg, #f8fafc, #e0e7ff, #f3e8ff, #fce7f3, #e0f2fe, #f8fafc);
    background-size: 300% 300%;
    animation: shimmerGradient 20s ease infinite;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.disc-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .disc-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
        border-color: rgba(56, 189, 248, 0.4);
    }
}

/* ── Tooltips ── */
.custom-tooltip {
    position: fixed;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    color: #0f172a;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.12), 0 8px 8px -8px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    max-width: 220px;
    text-align: center;
    line-height: 1.4;
}

.custom-tooltip.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    height: 10px;
    border-radius: 6px;
    border: none;
    pointer-events: none;
    cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: #38bdf8;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 30;
    pointer-events: all;
    margin-top: -4px;
}

input[type=range]::-moz-range-thumb {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: #38bdf8;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 30;
    pointer-events: all;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: transparent;
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 8px;
    background: transparent;
}

/* ── Bag button states ─────────────────────────────── */
/* IN BAG badge display class */
.bag-badge {
    display: flex;
    z-index: 50;
}

/* In some bag but NOT the active one: muted mint */
.bag-btn.in-collection>div {
    border-color: #6ee7b7 !important;
    background-color: #ecfdf5 !important;
    color: #059669 !important;
}

/* In the ACTIVE/primary bag: solid bright green */
.bag-btn.active>div {
    border-color: #10b981 !important;
    background-color: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 2px #a7f3d0, 0 2px 6px rgba(16, 185, 129, .35) !important;
}

/* Fav button when favorited: pink */
.fav-btn.active>div {
    border-color: #ec4899 !important;
    background-color: #fdf2f8 !important;
    color: #ec4899 !important;
}

/* Hover tones for unselected states */
.bag-btn:hover>div {
    border-color: #6ee7b7;
    color: #10b981;
}

.fav-btn:hover>div {
    border-color: #f9a8d4;
    color: #f472b6;
}

/* Use default cursor on card — only drag handle uses grab */
.bag-card[draggable="true"] {
    cursor: default;
    transition: box-shadow .2s, opacity .2s;
}

.bag-card.drag-over {
    box-shadow: 0 0 0 2px #38bdf8, 0 4px 16px rgba(56, 189, 248, .2) !important;
}

.bag-card.dragging {
    opacity: 0.4;
}

/* ── Drag handle: visible, clearly interactive ────────── */
.drag-handle {
    color: #1e293b !important;
    cursor: move !important;
    padding: 3px;
    border-radius: 4px;
    user-select: none;
}

.drag-handle:hover {
    color: #1e293b !important;
    background-color: #e2e8f0;
}

.drag-handle:active {
    cursor: move !important;
}

.bg-canvas {
    /* Softened fairway gradient: Medium green at bottom, lighter in distance */
    background: linear-gradient(to top, #bbf7d0 0%, #dcfce7 100%);
}

.wind-dial-container {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    margin: 0 auto;
    touch-action: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.wind-dial-arrow {
    position: absolute;
    top: 10%;
    left: 50%;
    width: 4px;
    height: 40%;
    background: #0ea5e9;
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(0deg);
    border-radius: 2px;
}

.wind-dial-arrow::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid #0ea5e9;
}

input[type="number"].inline-input {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #475569;
    width: 50px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    outline: none;
    transition: all 0.2s;
    cursor: text;
    padding: 2px 0;
}

input[type="number"].inline-input:hover {
    border-color: #38bdf8;
    background: #f8fafc;
}

input[type="number"].inline-input:focus {
    color: #0f172a;
    background: #ffffff;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* ── Throw Profile Onboarding ───────────────────────── */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding-card {
    background: #ffffff;
    width: 100%;
    max-width: 520px;
    border-radius: 2rem;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.onboarding-step {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    animation: slideIn 0.4s ease-out;
}

.onboarding-step.active {
    display: flex;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.selection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.selection-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.selection-card:hover {
    border-color: #38bdf8;
    background: #f0f9ff;
    transform: translateY(-2px);
}

.selection-card.selected {
    border-color: #0ea5e9;
    background: #e0f2fe;
    box-shadow: 0 0 0 1px #0ea5e9;
}

.selection-card svg {
    width: 3rem;
    height: 3rem;
    color: #64748b;
    transition: color 0.2s;
}

.selection-card.selected svg {
    color: #0ea5e9;
}

.step-indicator {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.step-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #e2e8f0;
    transition: all 0.3s;
}

.step-dot.active {
    background: #0ea5e9;
    width: 1.5rem;
    border-radius: 1rem;
}

/* Angle Preset Visuals */
.angle-visual {
    width: 80px;
    height: 8px;
    background: #cbd5e1;
    border-radius: 4px;
    position: relative;
    transition: transform 0.3s;
}

.angle-visual.hyzer {
    transform: rotate(-15deg);
}

.angle-visual.flat {
    transform: rotate(0deg);
}

.angle-visual.anhyzer {
    transform: rotate(15deg);
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #0ea5e9;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.3);
}

/* Toggle switch for throw profile */
#throwProfileToggle:checked+.block {
    background-color: #0ea5e9;
}

#throwProfileToggle:checked+.block .dot {
    transform: translateX(100%);
}

/* ──────────────────────────────────────────────────────────────────────────
   Disc IQ: BENTO BOX & MASTER CONTROL THEME
   ────────────────────────────────────────────────────────────────────────── */

:root {
    /* Disc IQ Design Tokens (Master Control) */
    --iq-font-main: 'Inter', sans-serif;
    --iq-font-accent: 'Outfit', sans-serif;
    
    --iq-clr-primary: #0ea5e9;    /* Sky 500 */
    --iq-gradient: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%); /* Vibrant Blue to Indigo */
    --iq-clr-primary-glow: rgba(14, 165, 233, 0.4);
    --iq-clr-accent: #8b5cf6;     /* Violet 500 */
    --iq-clr-bg: #ffffff;
    --iq-clr-bg-alt: #f8fafc;
    --iq-clr-txt: #0f172a;
    --iq-clr-txt-muted: #64748b;
    
    --iq-radius: 1.25rem;
    --iq-blur: 16px;
    --iq-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Entry Trigger Button on Disc Tiles (Persistent) */
.iq-trigger-btn {
    z-index: 30;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    background: var(--iq-gradient);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    color: white;
    font-family: var(--iq-font-accent);
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
    cursor: pointer;
    white-space: nowrap;
}

.iq-trigger-btn:hover {
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.6);
    transform: translateY(-2px) scale(1.05);
}

.iq-trigger-btn:active {
    transform: scale(0.95);
}

.iq-trigger-btn svg {
    width: 12px;
    height: 12px;
    color: white;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

/* Removed hover logic for persistence */
.disc-card:hover .iq-trigger-btn {
    opacity: 1;
    transform: none;
}
.iq-trigger-btn {
    opacity: 1;
    transform: none;
}

/* Bento Box Layout System */
.iq-bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-gap: 1.25rem;
    padding: 1.25rem;
}

@media (max-width: 1024px) {
    .iq-bento-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 640px) {
    .iq-bento-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.iq-widget {
    background: var(--iq-clr-bg);
    border-radius: var(--iq-radius);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.iq-widget:hover {
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: rgba(14, 165, 233, 0.2);
}

/* Custom Scrollbar for Bento Box */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 99px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(14, 165, 233, 0.4);
}

/* ── Disc Category Tags ─────────────────────────────── */
.disc-category-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    white-space: nowrap;
    pointer-events: none;
    text-shadow: 0 1.5px 3px rgba(0, 0, 0, 0.3);
}

.tag-putter {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.tag-midrange {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
}

.tag-fairway {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.tag-control {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.tag-distance {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}
