/* Root Variable System */
:root {
    --bg-main: #0a0e1a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-color-hover: rgba(255, 255, 255, 0.15);

    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    /* Primary Colors (HSL) */
    --primary: hsl(250, 85%, 65%);
    --primary-glow: hsla(250, 85%, 65%, 0.15);
    --secondary: hsl(190, 90%, 50%);
    --accent: hsl(325, 90%, 60%);
    --accent-glow: hsla(325, 90%, 60%, 0.15);

    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    /* Fonts */
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Lotto Ball HSL colors */
    --ball-yellow: radial-gradient(circle at 30% 30%, #ffd000, #b27a00);
    --ball-blue: radial-gradient(circle at 30% 30%, #3b82f6, #1d4ed8);
    --ball-red: radial-gradient(circle at 30% 30%, #ef4444, #b91c1c);
    --ball-grey: radial-gradient(circle at 30% 30%, #9ca3af, #4b5563);
    --ball-green: radial-gradient(circle at 30% 30%, #10b981, #047857);

    /* Legacy/Inline Variable Aliases */
    --color-primary: var(--primary);
    --color-secondary: var(--secondary);
    --color-text: var(--text-primary);
    --color-muted: var(--text-secondary);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Ambient Background Glow Blobs */
.glow-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.35;
    pointer-events: none;
    animation: floatBlob 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 80%);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 80%);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 80%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(50px, -50px) scale(1.1);
    }

    100% {
        transform: translate(-30px, 40px) scale(0.95);
    }
}

/* App Container Layout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Premium Header Styles */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2.5rem;
    background: rgba(10, 14, 26, 0.6);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    cursor: pointer;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
    transition: all 0.3s ease;
    animation: pulseGlow 3s infinite alternate ease-in-out;
}

.logo:hover .logo-icon {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
    }
    100% {
        box-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
    }
}

.logo-plus-badge {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, var(--accent) 0%, #d946ef 100%);
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    margin-left: 0.35rem;
    letter-spacing: 0.05em;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.3);
    vertical-align: middle;
}

.gradient-text {
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Header Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.main-nav li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.main-nav li a i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.main-nav li:hover a,
.main-nav li.active a {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.main-nav li:hover a i {
    transform: translateY(-2px);
}

.main-nav li.active a {
    box-shadow: inset 0 0 0 1px var(--border-color-hover);
}

/* User Profile & Auth info in Header */
.auth-status-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.user-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Core Buttons Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), hsl(250, 85%, 55%));
    color: #fff;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(124, 58, 237, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color-hover);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-primary);
}

.btn-icon {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    width: 2.2rem;
    height: 2.2rem;
    padding: 0;
    border-radius: 50%;
    color: var(--text-secondary);
}

.btn-icon:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    transform: scale(1.05);
}

.btn-logout:hover {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-lg {
    padding: 0.8rem 1.6rem;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

.w-full {
    width: 100%;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.75rem;
    transition: border-color 0.3s, background-color 0.3s;
}

.glass-card:hover {
    border-color: var(--border-color-hover);
    background: var(--bg-card-hover);
}

/* Workspace Sections */
.main-content {
    flex: 1;
    padding: 2.5rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.workspace-section {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.workspace-section.active {
    display: block;
}

.workspace-section>*+* {
    margin-top: 1.5rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

.section-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* SECTION 1: Welcome & Landing UI */
.welcome-hero {
    text-align: center;
    margin: 3.5rem 0;
}

.welcome-hero h1 {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.25rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
}

/* Latest Draw Card Styling */
.latest-draw-container {
    max-width: 750px;
    margin: 0 auto 3.5rem auto;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.latest-draw-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.draw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.draw-header h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
}

.draw-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.draw-numbers-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

/* Lotto Ball Style */
.lotto-balls {
    display: flex;
    gap: 0.75rem;
}

.ball {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
    user-select: none;
}

.ball:hover {
    transform: scale(1.1) translateY(-2px);
}

/* Dynamic Lotto Ball colors matching standard K-Lotto range */
.ball.num-1-10,
.ball.color-1 {
    background: var(--ball-yellow);
}

.ball.num-11-20,
.ball.color-2 {
    background: var(--ball-blue);
}

.ball.num-21-30,
.ball.color-3 {
    background: var(--ball-red);
}

.ball.num-31-40,
.ball.color-4 {
    background: var(--ball-grey);
}

.ball.num-41-45,
.ball.color-5 {
    background: var(--ball-green);
}

.ball.color-bonus {
    background: radial-gradient(circle at 30% 30%, var(--accent), hsl(325, 90%, 40%));
    box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.3), 0 0 15px var(--accent-glow);
}

.plus-sign {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.bonus-ball-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.bonus-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
}

.draw-prize-info {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 1rem;
}

.prize-metric {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4.5rem;
}

.feature-item {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.35rem;
}

.bg-gradient-blue {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}

.bg-gradient-purple {
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.bg-gradient-orange {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.feature-item h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
}

.feature-item p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Grades / Membership Section */
.grades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.grade-card {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2.25rem;
}

.grade-card.popular {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.1);
}

.badge-popular {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.65rem;
    font-weight: 800;
    background: var(--secondary);
    color: #0b0f19;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    letter-spacing: 0.05em;
}

.grade-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.grade-card .price {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.grade-card ul {
    list-style: none;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: auto;
}

.grade-card li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-center {
    text-align: center;
}

/* Tables and Data Displays */
.table-card {
    padding: 0.75rem 0;
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.data-table th,
.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.01);
}

.data-table tbody tr {
    transition: background-color 0.2s;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.page-indicator {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Dynamic Auth Blur Lock Gate system (단, 색상은 나오게 하기) */
.auth-gate-wrapper {
    position: relative;
    min-height: 400px;
}

.auth-gate-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: rgba(13, 19, 35, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color-hover);
    padding: 2.5rem;
    border-radius: 20px;
    max-width: 480px;
    width: calc(100% - 2rem);
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn {
    from {
        transform: translate(-50%, -45%) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.lock-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulseLock 2s infinite;
}

@keyframes pulseLock {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
        filter: brightness(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.auth-gate-content h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
}

.auth-gate-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Blur styles */
.stats-workspace-blur {
    transition: filter 0.4s ease;
}

/* When not logged in: add blurred class to wrapper */
.auth-gate-wrapper.locked .stats-workspace-blur {
    filter: blur(12px) brightness(0.6);
    pointer-events: none;
    user-select: none;
}

.auth-gate-wrapper.locked .auth-gate-content {
    display: flex;
}

/* SECTION 3: Charts Layout */
.stats-charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

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

.stat-summary-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-summary-card strong {
    font-family: var(--font-heading);
    font-size: 1.6rem;
}

.trend-balls,
.trend-number-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.trend-balls .ball {
    width: 2rem;
    height: 2rem;
    font-size: 0.8rem;
    box-shadow: none;
}

.mini-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8rem;
    height: 1.8rem;
    padding: 0 0.35rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
}

.compact-balls {
    gap: 0.22rem !important;
    flex-wrap: nowrap;
}

.density-map {
    display: grid;
    grid-template-columns: 0.85fr repeat(5, 1fr);
    gap: 0.35rem;
    min-height: 0;
    overflow: auto;
    padding-top: 0.25rem;
}

.density-cell {
    min-height: 2.15rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.density-head {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
}

.density-value {
    color: #fff;
    background: rgba(6, 182, 212, calc(0.12 + var(--density) * 0.58));
    border: 1px solid rgba(6, 182, 212, calc(0.16 + var(--density) * 0.44));
    box-shadow: inset 0 0 18px rgba(255, 255, 255, calc(var(--density) * 0.08));
}

.chart-container {
    height: 380px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chart-container canvas {
    max-height: 300px;
}

/* Stats Sub Tabs Styling */
.stats-sub-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    margin-top: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.stats-sub-tab {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.6rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.stats-sub-tab:hover,
.stats-sub-tab.active {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-color-hover);
}

.stats-sub-tab.active {
    border-color: var(--secondary);
    background: rgba(6, 182, 212, 0.08);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

.stats-tab-content {
    display: none;
    animation: fadeInStats 0.4s ease-out;
}

.stats-tab-content.active {
    display: block;
}

.stats-guide-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(6, 182, 212, 0.18);
    border-radius: 10px;
    background: rgba(6, 182, 212, 0.055);
    color: var(--text-secondary);
    line-height: 1.6;
}

.stats-guide-card strong {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 0.92rem;
}

.stats-guide-card i {
    color: var(--secondary);
}

.stats-guide-card p {
    font-size: 0.88rem;
}

@keyframes fadeInStats {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.chart-container h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
}

.donut-wrapper {
    max-width: 250px;
    height: 250px;
    position: relative;
    margin: 0 auto;
    flex: 1;
    display: flex;
    align-items: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.pointer {
    cursor: pointer;
}

/* SECTION 4: Generator Workspace */
.generator-workspace {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.option-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.option-tab {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: left;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.option-tab:hover,
.option-tab.active {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-color-hover);
}

.option-tab.active {
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
}

.tab-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-title i {
    color: var(--secondary);
}

.tab-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Options Settings panel */
.settings-panel {
    display: none;
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
    margin-top: 1.25rem;
}

.settings-panel.active {
    display: block;
}

.panel-info-msg {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: flex;
    gap: 0.5rem;
}

.panel-info-msg i {
    color: var(--primary);
    margin-top: 2px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
}

select option {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}

.number-tag-input {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-height: 35px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.35rem;
    border: 1px solid var(--border-color);
}

.tag {
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.tag .btn-remove-tag {
    cursor: pointer;
    font-size: 0.7rem;
    opacity: 0.7;
}

.tag .btn-remove-tag:hover {
    opacity: 1;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.ml-2 {
    margin-left: 0.5rem;
}

.saju-info-box {
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
}

.saju-info-box>p:first-child {
    margin-bottom: 0.75rem;
}

.saju-volatile-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.saju-volatile-form .form-group label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.info-text {
    color: var(--text-muted);
    line-height: 1.55;
}

.profile-privacy-note {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
}

/* Generator Output Display */
.generator-output {
    min-height: 480px;
    display: flex;
    flex-direction: column;
}

.output-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex: 1;
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
}

.output-placeholder-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.05);
}

.output-results {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-top: 1rem;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.generated-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    transition: transform 0.2s, border-color 0.2s;
}

.generated-row:hover {
    transform: scale(1.01);
    border-color: var(--border-color-hover);
    background: rgba(255, 255, 255, 0.04);
}

.set-index {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.generated-balls {
    display: flex;
    gap: 0.5rem;
}

.generated-balls .ball {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.95rem;
}

/* SECTION 5: Simulator Layout */
.simulator-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.simulator-balls-input {
    display: flex;
    gap: 0.35rem;
    justify-content: space-between;
}

.sim-ball-input {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-primary);
    transition: all 0.3s;
}

.sim-ball-input:focus {
    outline: none;
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

/* Hide spin buttons */
.sim-ball-input::-webkit-outer-spin-button,
.sim-ball-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-danger-text {
    color: var(--danger);
}

.btn-danger-text:hover {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
}

.sim-report-content {
    animation: fadeIn 0.4s ease-out;
}

.sim-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.metric-box {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.font-primary {
    color: var(--primary);
}

.font-success {
    color: var(--success);
}

/* Modals Overlay & frosted card */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    max-width: 500px;
    width: calc(100% - 2rem);
    background: rgba(13, 18, 32, 0.85);
    border: 1px solid var(--border-color-hover);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    animation: modalShow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalShow {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.modal-body>*+* {
    margin-top: 1rem;
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: var(--text-primary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hidden {
    display: none !important;
}

.auth-toggle-msg {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.auth-toggle-msg a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

.auth-toggle-msg a:hover {
    text-decoration: underline;
}

/* SECTION 7: Admin Panel Dashboard */
.admin-dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-metric-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-metric-header .label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.admin-metric-header .icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
}

.admin-metric-card .value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
}

.admin-tabs {
    display: flex;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
    margin-bottom: 1.5rem;
}

.admin-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-tab:hover,
.admin-tab.active {
    color: var(--text-primary);
}

.admin-tab.active {
    border-color: var(--primary);
}

.admin-panel-content {
    display: none;
}

.admin-panel-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

.admin-panel-content.glass-card {
    padding: 1.25rem;
}

.table-header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.inline-input {
    max-width: 280px;
}

/* Membership profile details box */
.membership-info-box {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
}

.membership-info-box p {
    line-height: 1.55;
}

.badge {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
}

/* QR Camera scan layout */
.qr-camera-mock {
    margin: 1.5rem auto;
    width: 200px;
    height: 200px;
    border-radius: 16px;
    background: #000;
    border: 2px solid var(--border-color-hover);
    position: relative;
    overflow: hidden;
}

.qr-scanner-lens {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130px;
    height: 130px;
    border: 2px dashed rgba(6, 182, 212, 0.5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.15);
}

.scanner-laser {
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--secondary);
    box-shadow: 0 0 8px var(--secondary);
    top: 0;
    animation: laserScan 2.5s infinite linear;
}

@keyframes laserScan {
    0% {
        top: 0;
    }

    50% {
        top: 100%;
    }

    100% {
        top: 0;
    }
}

/* Social Share Button custom themes */
.social-share-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.btn-social {
    color: #fff;
    font-size: 0.85rem;
}

.btn-kakao {
    background: #fee500;
    color: #000000;
}

.btn-kakao:hover {
    background: #edd300;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.12);
}

.modal-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

/* Toast Notifications Container */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 10000;
}

.toast {
    background: rgba(13, 19, 35, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color-hover);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.88rem;
    font-weight: 500;
    animation: toastSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

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

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--danger);
}

.toast.info i {
    color: var(--secondary);
}

/* Extra responsive tweaks */
@media (max-width: 1024px) {
    .main-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .generator-workspace,
    .simulator-layout {
        grid-template-columns: 1fr;
    }
}

/* ===== 법적 면책 문구 스타일 (항목 1) ===== */
.legal-disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.legal-disclaimer i {
    color: var(--warning);
    margin-right: 0.35rem;
}

/* ===== 개인정보 동의 체크박스 (항목 1) ===== */
.privacy-consent-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.88rem;
    line-height: 1.5;
}

.consent-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.consent-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 1.5rem;
    margin-top: 0.25rem;
    line-height: 1.5;
}

/* ===== 모바일 반응형 (항목 6) ===== */
.btn-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
}

.btn-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

.btn-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.btn-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.btn-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .btn-hamburger {
        display: flex;
    }

    .main-header {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        position: relative;
    }

    .main-nav {
        display: none;
        width: 100%;
        order: 10;
        background: rgba(10, 14, 26, 0.97);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        padding: 0.5rem 0;
    }

    .main-nav.nav-open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .main-nav ul li a {
        padding: 0.75rem 1.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        border-radius: 0;
    }

    .auth-status-container {
        margin-left: auto;
    }

    .main-content {
        padding: 0.85rem;
    }

    .glass-card {
        border-radius: 12px;
        padding: 1rem;
    }

    .table-card {
        padding: 0.35rem 0;
    }

    .welcome-hero h1 {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-actions .btn-lg {
        width: 100%;
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .grades-grid {
        grid-template-columns: 1fr;
    }

    .admin-dashboard-metrics {
        grid-template-columns: 1fr;
    }

    .stats-charts-row {
        grid-template-columns: 1fr;
    }

    .stats-metric-grid {
        grid-template-columns: 1fr 1fr;
    }

    .density-map {
        grid-template-columns: 4.5rem repeat(5, minmax(4rem, 1fr));
    }

    .generator-workspace {
        grid-template-columns: 1fr;
    }

    .simulator-layout {
        grid-template-columns: 1fr;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        font-size: 0.82rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.65rem;
    }

    .data-table .lotto-balls {
        flex-wrap: nowrap;
        gap: 0.22rem !important;
    }

    .data-table .ball {
        width: 1.45rem !important;
        height: 1.45rem !important;
        font-size: 0.66rem !important;
    }

    #table-history th:nth-child(2),
    #table-history td:nth-child(2),
    #table-history th:nth-child(5),
    #table-history td:nth-child(5),
    #table-history th:nth-child(6),
    #table-history td:nth-child(6),
    #table-mybox th:nth-child(2),
    #table-mybox td:nth-child(2),
    #table-mybox th:nth-child(4),
    #table-mybox td:nth-child(4),
    #table-mybox th:nth-child(7),
    #table-mybox td:nth-child(7),
    #table-won-history th:nth-child(5),
    #table-won-history td:nth-child(5),
    #table-admin-users th:nth-child(1),
    #table-admin-users td:nth-child(1),
    #table-admin-users th:nth-child(4),
    #table-admin-users td:nth-child(4),
    #table-admin-users th:nth-child(7),
    #table-admin-users td:nth-child(7),
    #table-admin-users th:nth-child(8),
    #table-admin-users td:nth-child(8),
    #table-admin-emails th:nth-child(1),
    #table-admin-emails td:nth-child(1),
    #table-admin-emails th:nth-child(4),
    #table-admin-emails td:nth-child(4),
    #table-admin-emails th:nth-child(6),
    #table-admin-emails td:nth-child(6),
    #table-recent-rounds th:nth-child(5),
    #table-recent-rounds td:nth-child(5),
    #table-recent-rounds th:nth-child(6),
    #table-recent-rounds td:nth-child(6),
    #table-recent-rounds th:nth-child(7),
    #table-recent-rounds td:nth-child(7) {
        display: none;
    }

    .modal-container {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
        max-height: 90vh;
        overflow-y: auto;
    }

    .admin-tabs {
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    .admin-tab {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    .toast-container {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .toast {
        font-size: 0.82rem;
    }

    .pagination {
        gap: 0.5rem;
        padding: 0.8rem 0.5rem;
    }

    .pagination .btn {
        padding: 0.45rem 0.65rem;
    }

    .lotto-balls {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .draw-numbers-row {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* 사주 휘발성 폼 */
    .saju-volatile-form {
        gap: 0.75rem;
    }

    /* 공유 팝업 */
    .share-url-box {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .welcome-hero h1 {
        font-size: 1.3rem;
    }

    .ball {
        width: 2rem;
        height: 2rem;
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .sim-metrics-grid {
        grid-template-columns: 1fr;
    }

    .stats-metric-grid {
        grid-template-columns: 1fr;
    }

    .table-header-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }

    .table-header-controls .inline-input {
        width: 100%;
        max-width: none;
    }

    .table-header-controls .ml-2 {
        margin-left: 0;
    }
}

/* ===== 비밀번호 변경 섹션 (항목 5) ===== */
.password-change-section h3 {
    font-size: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.password-change-section h3 i {
    color: var(--primary);
}

/* ===== 모달 대형 (프로필) ===== */
.modal-container-lg {
    max-width: 520px;
}

/* ===== 공유 초대 모달 (항목 7) ===== */
.share-invite-message {
    background: rgba(139, 92, 246, 0.05) !important;
    border-left-color: var(--primary) !important;
}

.share-url-box input {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

/* ===== 마이박스 탭 ===== */
.mybox-tab {
    font-size: 0.9rem;
}

.mybox-panel-content {
    display: none;
}

.mybox-panel-content.active {
    display: block;
}

/* ===== 당첨 이력 헤더 ===== */
.won-history-header {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

/* ===== 폰트 성공 ===== */
.font-success {
    color: var(--success) !important;
}

/* ===== 페이지네이션 기본 ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0 0.5rem;
}

/* ===== 🏆 주간 당첨 추천 현황 (Weekly Winners) ===== */
.weekly-winners-container {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border-color);
}

.winners-header h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
}

.winner-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.winner-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-color-hover);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.winner-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.winner-round {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.winner-prize {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--success);
    margin: 0.25rem 0;
}

.winner-user-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.winner-user-name {
    color: var(--text-secondary);
    font-weight: 600;
}

/* ===== 🎯 내 번호 통계 분석기 (Stats Analyzer) ===== */
.stats-analyzer-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
}

.stats-analyzer-card h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
}

.analyzer-ball-input {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.analyzer-results-panel {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    animation: fadeInStats 0.4s ease-out;
}

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

.analyzer-metric-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.analyzer-metric-title {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.analyzer-metric-val {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.analyzer-metric-desc {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.indicator-gold {
    border-left: 3px solid var(--success);
}

.indicator-normal {
    border-left: 3px solid var(--primary);
}

.indicator-rare {
    border-left: 3px solid var(--danger);
}

/* ===== 💬 자유게시판 (Free Board) ===== */
.board-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem !important;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.07) 0%, rgba(124, 58, 237, 0.03) 100%);
    border-bottom: 1px solid var(--border-color);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    position: relative;
}

.board-toolbar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
}

.board-info {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.board-info i {
    color: var(--secondary);
    font-size: 1.15rem;
    animation: pulseIcon 2.5s infinite alternate ease-in-out;
}

@keyframes pulseIcon {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 2px var(--secondary));
    }
    100% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 8px var(--secondary));
    }
}

#btn-board-write {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 700 !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 30px !important;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#btn-board-write:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45) !important;
    filter: brightness(1.1) !important;
}

/* Table Hover & Cell Styling upgrades */
.data-table th {
    font-family: var(--font-heading) !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    background: rgba(0, 0, 0, 0.15) !important;
    text-transform: uppercase !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.05em !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.data-table tbody tr {
    transition: all 0.25s ease !important;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.035) !important;
}

.data-table td {
    padding: 1.1rem 1.5rem !important;
    border-bottom: 1px solid var(--border-color) !important;
    font-size: 0.9rem !important;
    color: var(--text-secondary) !important;
}

.data-table tbody tr:hover td {
    color: var(--text-primary) !important;
}

.data-table td strong {
    transition: color 0.2s ease !important;
}

.data-table tbody tr:hover td strong {
    color: var(--secondary) !important;
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.post-content-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.post-content-body::-webkit-scrollbar {
    width: 6px;
}

.post-content-body::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* ===== 💬 자유게시판 모달 및 버튼 디자인 개선 ===== */
.modal-container-lg {
    max-width: 780px !important;
}

.btn-danger-text {
    color: var(--danger) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

.btn-danger-text:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: var(--danger) !important;
}

/* ===== Utility Flex & Spacing Classes (For buttons and alignment) ===== */
.flex-row {
    display: flex !important;
    flex-direction: row !important;
}

.justify-end {
    justify-content: flex-end !important;
}

.justify-between {
    justify-content: space-between !important;
}

.align-center {
    align-items: center !important;
}

.gap-2 {
    gap: 0.5rem !important;
}

.gap-3 {
    gap: 0.75rem !important;
}

.mt-4 {
    margin-top: 1rem !important;
}

.pt-3 {
    padding-top: 0.75rem !important;
}

/* =====================================================================
   💬 오늘의 행운 룰렛 & 골든존 가이드 (Lucky Roulette & Golden Zone Guide)
   ===================================================================== */
.interactive-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.roulette-container, .golden-zone-guide {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.card-header-icon {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.card-header-icon i {
    font-size: 1.4rem;
    color: var(--secondary);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.card-header-icon h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.fa-spin-slow {
    animation: fa-spin 8s infinite linear;
}

.card-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

/* Roulette Canvas Styles */
.roulette-wheel-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 1.5rem auto;
    border-radius: 50%;
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.25);
    background: #0f172a;
    border: 4px solid var(--border-color);
}

.roulette-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 20px solid #ef4444;
    filter: drop-shadow(0 2px 5px rgba(239, 68, 68, 0.5));
    z-index: 10;
}

.roulette-controls {
    text-align: center;
    margin-bottom: 1rem;
}

.roulette-result {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    padding: 1rem;
    border-radius: 12px;
    animation: slideUpFade 0.4s ease-out;
}

.result-number-ball {
    flex-shrink: 0;
}

.result-number-ball .ball {
    width: 3.2rem;
    height: 3.2rem;
    font-size: 1.4rem;
    box-shadow: 0 0 15px currentColor;
}

.result-fortune-text {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Guide Tabs Styles */
.guide-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem;
    border-radius: 8px;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.guide-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 0.25rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.guide-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.guide-tab-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    box-shadow: 0 4px 10px rgba(6, 182, 212, 0.25);
}

.guide-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.guide-tab-content.active {
    display: block;
}

/* Gauge Bar styles */
.gauge-container {
    margin-bottom: 1.5rem;
}

.gauge-label {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    text-align: right;
}

.gauge-bar-bg {
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.gauge-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 100%);
    border-radius: 6px;
    box-shadow: 0 0 10px var(--secondary);
}

.gauge-axis {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.highlight-range {
    color: var(--text-primary);
    font-weight: 700;
    background: rgba(6, 182, 212, 0.15);
    padding: 0 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Stats bars styles */
.stats-bars {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.82rem;
}

.stat-label {
    width: 140px;
    flex-shrink: 0;
    color: var(--text-primary);
}

.stat-bar-bg {
    flex-grow: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 4px;
}

.stat-val {
    width: 45px;
    text-align: right;
    font-weight: bold;
    color: var(--text-primary);
}

/* Info highlights */
.info-highlight-box {
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.highlight-title {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.highlight-stats {
    display: flex;
    justify-content: space-around;
    font-size: 0.8rem;
}

.h-stat {
    color: var(--text-primary);
}

.h-stat strong {
    color: var(--accent);
    font-size: 0.95rem;
    margin-left: 0.25rem;
}

.guide-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}