body {
    font-family: 'Spoqa Han Sans Neo', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -0.01em;
    line-height: 1.6;
    background:
        radial-gradient(ellipse 120% 80% at 0% 0%, rgba(139, 92, 246, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse 120% 80% at 100% 100%, rgba(236, 72, 153, 0.2) 0%, transparent 60%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    min-height: 100vh;
    color: #e2e8f0;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.info-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 1rem;
}

/* 모바일 네비게이션 스크롤바 숨기기 */
.mobile-nav-container::-webkit-scrollbar {
    display: none;
}

.mobile-nav-container {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Dark Mode Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #6366f1 rgba(15, 23, 42, 0.5);
}

/* Main Title Gradient */
.main-title {
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Search Input Style */
.search-input {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: #f1f5f9;
}

.search-input:focus {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-1px);
}

.search-input::placeholder {
    color: #94a3b8;
}

.coupang-banner {
    margin-top: 2rem;
    text-align: center;
}

/* Calculator Input Style - Matching Search Input */
.calc-input {
    font-family: inherit;
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: #f1f5f9;
}

.calc-input:focus {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-1px);
}

.calc-input::placeholder {
    color: #64748b;
}

/* Date/Month input fields - Dark mode */
input[type="month"],
input[type="date"] {
    font-family: inherit;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: #f1f5f9;
    color-scheme: dark;
}

input[type="month"]:focus,
input[type="date"]:focus {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.5);
}

input[type="month"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* Dynamic inputs in Percentage & GPA calculators */
#percentageInputsContainer input,
#gpaRowsContainer input,
#gpaRowsContainer select {
    font-family: inherit;
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: #f1f5f9;
}

#percentageInputsContainer input:focus,
#gpaRowsContainer input:focus,
#gpaRowsContainer select:focus {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-1px);
}

/* Custom Radio Button Style - Works with existing HTML structure */
label:has(input[type="radio"]) {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    color: #94a3b8;
}

label:has(input[type="radio"]):hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #f1f5f9;
}

label:has(input[type="radio"]) input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #64748b;
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}

label:has(input[type="radio"]):hover input[type="radio"] {
    border-color: #94a3b8;
}

label:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(217, 70, 239, 0.2) 100%);
    border-color: rgba(139, 92, 246, 0.5);
    font-weight: 600;
    color: #e9d5ff;
}

label:has(input[type="radio"]:checked) input[type="radio"] {
    border-color: #a78bfa;
    background-color: #a78bfa;
}

label:has(input[type="radio"]:checked) input[type="radio"]::after {
    content: '';
    display: block;
    width: 0.5rem;
    height: 0.5rem;
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.copy-btn {
    padding: 0.5rem;
    color: #64748b;
    transition: color 0.2s;
}

.copy-btn:hover {
    color: #a78bfa;
}

.copy-message {
    font-size: 0.875rem;
    color: #a78bfa;
    font-weight: 600;
    position: absolute;
    top: -1.5rem;
    right: 0;
}

.result-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- CALCULATOR HUB STYLES --- */

/* Category Filter Buttons */
.category-filter-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.category-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    transform: translateY(-1px);
}

.category-filter-btn.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

/* Calculator Cards */
.calculator-card {
    display: block;
    text-decoration: none;
    position: relative;
    transition: 0.5s ease-out;
    overflow: visible;
}

.calculator-card:hover {
    transform: translateY(-4px);
}

.calculator-card .card-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.25rem;
    padding: 1rem 0.75rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Skew Slide Effect */
.calculator-card .card-content::before {
    content: "";
    position: absolute;
    height: 100%;
    width: 0%;
    top: 0;
    left: -60px;
    transform: skewX(45deg);
    background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
    z-index: -1;
    transition: all 0.5s ease;
}

.calculator-card:hover .card-content::before {
    width: 250%;
}

.calculator-card:hover .card-content {
    background: transparent;
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

.calculator-card .card-icon {
    width: 2rem;
    height: 2rem;
    color: #a78bfa;
    margin-bottom: 0.5rem;
    transition: all 0.5s ease;
}

.calculator-card:hover .card-icon {
    color: #ffffff;
    transform: scale(1.1);
}

.calculator-card .card-title {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.875rem;
    transition: color 0.5s ease;
}

.calculator-card:hover .card-title {
    color: #ffffff;
}



/* --- NEW DESKTOP SIDEBAR STYLES --- */
.sidebar-category-header {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #e2e8f0;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sidebar-category-header:hover {
    background-color: rgba(139, 92, 246, 0.1);
}

.category-chevron {
    transition: transform 0.2s ease-in-out;
    color: #94a3b8;
}

.category-chevron.open {
    transform: rotate(180deg);
}

.sidebar-category-content {
    padding-left: 1rem;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.calculator-link {
    display: block;
    padding: 0.6rem 0.5rem;
    font-size: 0.875rem;
    color: #94a3b8;
    border-radius: 0.375rem;
    transition: background-color 0.2s, color 0.2s;
}

.calculator-link:hover {
    background-color: rgba(139, 92, 246, 0.1);
    color: #f1f5f9;
}

.calculator-link.active-nav-link {
    background-color: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    font-weight: 600;
}

/* Roulette Styles */
#rouletteCanvas {
    transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

#roulettePointer {
    z-index: 10;
    filter: drop-shadow(0 -2px 2px rgba(0, 0, 0, 0.2));
}

.winner-highlight {
    background-color: #dbeafe !important;
    /* blue-100 */
    border: 2px solid #3b82f6;
    /* blue-500 */
    font-weight: bold;
}

/* Sidebar Title Style */
.sidebar-title {
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-icon {
    stroke: #e0e7ff;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(139, 92, 246, 0.2);
    border-top-color: #a78bfa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Calculator Loading State */
.calc-loading {
    position: relative;
    pointer-events: none;
}

.calc-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top-color: #a78bfa;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   DARK MODE GLOBAL OVERRIDES
   ============================================ */

/* Result areas - override Tailwind bg-gray-50 */
.bg-gray-50 {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
}

/* Text colors - override Tailwind grays for dark mode */
.text-gray-800 {
    color: #f1f5f9 !important;
}

.text-gray-700 {
    color: #e2e8f0 !important;
}

.text-gray-600 {
    color: #94a3b8 !important;
}

.text-gray-500 {
    color: #64748b !important;
}

/* Info boxes - Alert styles */
.bg-amber-50 {
    background: rgba(251, 191, 36, 0.1) !important;
    border-color: rgba(251, 191, 36, 0.5) !important;
}

.text-amber-700 {
    color: #fcd34d !important;
}

.bg-blue-50 {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
}

.text-blue-700 {
    color: #93c5fd !important;
}

.bg-red-50 {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
}

.text-red-700 {
    color: #fca5a5 !important;
}

/* Primary buttons - neon gradient */
.bg-blue-500 {
    background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%) !important;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.bg-blue-500:hover {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

/* Secondary/Reset buttons */
.bg-blue-100 {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}

.bg-blue-100:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

.text-blue-700 {
    color: #c4b5fd !important;
}

/* Labels */
.font-semibold.text-gray-700 {
    color: #cbd5e1 !important;
}

/* Horizontal rules */
hr {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Deduction items in salary calculator etc. */
.text-sm.text-gray-600 {
    color: #94a3b8 !important;
}

/* Winner highlight for roulette */
.winner-highlight {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(217, 70, 239, 0.3) 100%) !important;
    border: 2px solid rgba(139, 92, 246, 0.5) !important;
    color: #f1f5f9 !important;
}

/* Commission rate table - Dark mode */
.bg-blue-50 {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

.text-blue-800 {
    color: #93c5fd !important;
}

.text-blue-600 {
    color: #60a5fa !important;
}

.bg-green-50 {
    background: rgba(34, 197, 94, 0.1) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
}

.text-green-800 {
    color: #86efac !important;
}

.text-green-600 {
    color: #4ade80 !important;
}

/* Rate table rows */
#commissionInfo .bg-white {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Yellow info boxes (Robux, etc.) - Dark mode */
.bg-yellow-100 {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(139, 92, 246, 0.5) !important;
}

.border-yellow-500 {
    border-color: rgba(139, 92, 246, 0.6) !important;
}

.text-yellow-700 {
    color: #e2e8f0 !important;
}

/* Customer Service Section */
.customer-service-container .text-2xl {
    font-size: 1.0rem;
    line-height: 1.2rem;
}

.customer-service-container .text-sm {
    font-size: 0.8rem;
    line-height: 1.25rem;
}