/* Icon Button Styles - Modern SVG buttons */
.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    outline: none;
}

/* Pill-shaped buttons with text content */
.icon-btn.streak-btn,
.icon-btn.spark-balance-btn {
    width: auto;
    min-width: 40px;
    height: 40px;
    border-radius: 20px;
    padding: 0 12px;
    gap: 4px;
    color: #fff;
}

/* Icon button hover states */
.icon-btn:hover,
.icon-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.icon-btn:active,
.icon-btn:focus,
.icon-btn:active:not(:disabled),
.icon-btn:focus:not(:disabled) {
    background: rgba(255, 255, 255, 0.22) !important;
    transform: scale(0.95);
    outline: none;
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    color: #fff;
    pointer-events: none;
}

/* Report button specific styling */
.icon-btn.report svg {
    color: #EF4444;
    width: 18px;
    height: 18px;
    transform: translate(1px, 4px); /* Shift right 1px and DOWN 1px to center visually */
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .icon-btn svg {
        width: 22px;
        height: 22px;
    }
    
    .icon-btn.report svg {
        width: 20px;
        height: 20px;
        transform: translate(1px, 4px); /* Match desktop positioning */
    }
}

/* === ACTION BUTTONS (STOP/NEXT) === */
.top-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    z-index: 50;
}

.bottom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    z-index: 50;
}

/* --- Ctrl button base --- */
.ctrl-btn {
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    flex-shrink: 0;
    padding: 0 !important;
    outline: none !important;
    text-decoration: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.ctrl-btn:active { transform: scale(0.9); }
.ctrl-btn:focus,
.ctrl-btn:focus-visible { outline: none !important; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important; }
.ctrl-btn svg { width: 20px; height: 20px; }

/* Settings — smallest */
.settings-wrap { position: relative; }
.btn-settings {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08) !important;
}
.btn-settings:hover,
.btn-settings:focus,
.btn-settings:visited { background: rgba(255, 255, 255, 0.14) !important; }
.btn-settings svg { width: 16px; height: 16px; color: rgba(255, 255, 255, 0.45) !important; }

/* Purple dot indicator on settings */
.btn-settings .indicator {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #feaf25;
    border: 2px solid rgba(0, 0, 0, 0.6);
    display: none;
    pointer-events: none;
}
.btn-settings .indicator.show { display: block; }

/* Like / Heart */
.btn-heart {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    flex-shrink: 0;
    padding: 0 !important;
    font-size: 18px;
    line-height: 1;
}
.btn-heart:active { transform: scale(0.9); }
.btn-heart:hover,
.btn-heart:focus { background: rgba(239, 68, 68, 0.2) !important; }
.btn-heart:visited { background: rgba(255, 255, 255, 0.1) !important; }
.btn-heart svg { color: #ef4444 !important; width: 20px; height: 20px; }

/* Stop */
.btn-stop {
    width: 54px;
    height: 54px;
    background: #ef4444 !important;
}
.btn-stop:hover,
.btn-stop:focus { background: #dc2626 !important; }
.btn-stop:visited { background: #ef4444 !important; }
.btn-stop svg { color: white !important; width: 20px; height: 20px; }

/* Next — biggest */
.btn-next {
    width: 60px;
    height: 60px;
    background: #feaf25 !important;
}
.btn-next:hover,
.btn-next:focus { background: #e69d1f !important; }
.btn-next:visited { background: #feaf25 !important; }
.btn-next svg { color: white !important; width: 22px; height: 22px; }

/* Spark */
.spark-wrap { position: relative; }
.btn-spark {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    flex-shrink: 0;
    padding: 0 !important;
    font-size: 18px;
    line-height: 1;
}
.btn-spark:active { transform: scale(0.9); }
.btn-spark:hover,
.btn-spark:focus { background: rgba(245, 166, 35, 0.2) !important; }
.btn-spark:visited { background: rgba(255, 255, 255, 0.1) !important; }
.btn-spark svg { color: #F5A623 !important; width: 20px; height: 20px; }

/* --- Settings Popover --- */
.settings-popover {
    position: absolute;
    bottom: calc(100% + 12px);
    left: -6px;
    width: 230px;
    background: rgba(18, 18, 24, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    padding: 6px;
    display: none;
    flex-direction: column;
    z-index: 200;
}
.settings-popover.show { display: flex; }
.settings-popover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 24px;
    width: 10px;
    height: 10px;
    background: rgba(18, 18, 24, 0.97);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transform: rotate(45deg);
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
    text-align: left;
}
.setting-row:hover { background: rgba(255, 255, 255, 0.04); }
.setting-row .left { display: flex; align-items: center; gap: 10px; }
.setting-row .icon-circle {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.setting-row .icon-circle svg { width: 15px; height: 15px; color: rgba(255, 255, 255, 0.5); }
.setting-row .label { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.7); }
.setting-row .sublabel { font-size: 10px; color: rgba(255, 255, 255, 0.25); font-weight: 500; }

/* Toggle switch */
.ctrl-toggle {
    width: 38px;
    height: 22px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
    cursor: pointer;
}
.ctrl-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
}
.ctrl-toggle.on { background: #feaf25; }
.ctrl-toggle.on::after { left: 19px; background: white; }

/* Checkbox */
.ctrl-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}
.ctrl-checkbox.checked { background: #feaf25; border-color: #feaf25; }
.ctrl-checkbox svg { width: 12px; height: 12px; color: white; opacity: 0; transition: opacity 0.15s; }
.ctrl-checkbox.checked svg { opacity: 1; }

/* --- Spark Popup --- */
.spark-popup {
    position: absolute;
    bottom: calc(100% + 12px);
    right: -6px;
    background: rgba(18, 18, 24, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    z-index: 200;
    white-space: nowrap;
    min-width: 120px;
}
.spark-popup.show { display: flex; }
.spark-popup::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 20px;
    width: 10px;
    height: 10px;
    background: rgba(18, 18, 24, 0.97);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transform: rotate(45deg);
}
.spark-popup .sp-opt {
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: none;
    color: #F5A623;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
}
.spark-popup .sp-opt:hover { background: rgba(245, 166, 35, 0.15); }

/* Mobile adjustments for action buttons */
@media (max-width: 768px) {
    .top-controls {
        padding: 10px;
        gap: 12px;
    }

    .bottom-controls {
        padding: 12px;
        gap: 8px;
    }

    .btn-settings { width: 40px; height: 40px; }
    .btn-heart { width: 46px; height: 46px; }
    .btn-stop { width: 48px; height: 48px; }
    .btn-next { width: 54px; height: 54px; }
    .btn-spark { width: 46px; height: 46px; }

    .settings-popover { width: 210px; }

    .setting-row { padding: 8px 10px; }
    .setting-row .icon-circle { width: 26px; height: 26px; border-radius: 6px; }
    .setting-row .icon-circle svg { width: 13px; height: 13px; }
    .setting-row .left { gap: 8px; }
    .setting-row .label { font-size: 12px; white-space: nowrap; }
    .setting-row .sublabel { font-size: 9px; }
}
