        /* 유튜브 설정 모달 프리미엄 스타일 통합 */
        #youtube-settings-modal .modal-content {
            background: var(--bg-modal);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--border-modal);
            border-radius: 20px;
            width: 480px;
            max-height: 90vh;
            overflow-y: auto;
            padding: 25px;
            box-shadow: var(--shadow-modal);
            color: var(--text-main);
            position: relative;
        }

        #youtube-settings-modal .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            padding-bottom: 10px;
        }

        #youtube-settings-modal h3 {
            font-size: 1.15rem;
            font-weight: 800;
            color: var(--text-title);
            margin: 0;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        #youtube-settings-modal label {
            display: block;
            margin: 15px 0 8px 0;
            font-size: 0.85rem;
            color: var(--text-main);
            /* Increased contrast */
            font-weight: 800;
            opacity: 1;
        }

        #youtube-settings-modal input[type="radio"] {
            display: none;
            /* Hide default radio */
        }

        #youtube-settings-modal input,
        #youtube-settings-modal textarea,
        #youtube-settings-modal select {
            width: 93%;
            background: var(--bg-input);
            border: 1px solid var(--border-modal);
            border-radius: 8px;
            padding: 10px 12px;
            color: var(--text-input);
            font-size: 0.85rem;
            margin-bottom: 12px;
            transition: all 0.2s;
        }

        .option-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            margin-bottom: 12px;
        }

        .ratio-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-bottom: 12px;
        }

        .option-card {
            background: var(--bg-option);
            border: 1px solid var(--border-modal);
            border-radius: 10px;
            padding: 10px 5px;
            text-align: center;
            cursor: pointer;
            color: var(--text-option);
        }

        .option-card.active {
            background: rgba(59, 130, 246, 0.15);
            border-color: #3b82f6;
            box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
            transform: translateY(-2px);
        }

        /* Dream Mode Option Card Enhancements */
        .dream-mode .option-card.active {
            background: rgba(255, 153, 200, 0.1) !important;
            border-color: #ff99c8 !important;
            box-shadow: 0 0 15px rgba(255, 153, 200, 0.5) !important;
        }

        .dream-mode .option-card i {
            color: #ff99c8;
            /* Soft Pink */
        }

        .dream-mode .option-card.active i {
            color: #5a4a5e !important;
            /* Higher Contrast Icon */
            text-shadow: 0 0 8px rgba(160, 231, 229, 0.4);
        }

        .dream-mode .option-card span {
            color: var(--text-sub);
            font-weight: 700;
        }

        .dream-mode .option-card.active span {
            color: #5a4a5e !important;
            /* Fixed Visibility Problem */
            font-weight: 800;
        }

        .option-card i {
            display: block;
            font-size: 1.2rem;
            margin-bottom: 4px;
            color: #3b82f6;
        }

        .option-card span {
            font-size: 0.75rem;
            color: #ccc;
        }

        .option-card.active span {
            color: #fff;
        }

        .modal-btn-group {
            display: flex;
            gap: 10px;
            margin-top: 10px;
            padding-bottom: 5px;
        }

        .btn-premium-save,
        .btn-premium-update {
            flex: 2;
            background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
            color: #fff;
            border: none;
            padding: 12px;
            border-radius: 10px;
            font-weight: 700;
            cursor: pointer;
        }

        .dream-mode .btn-premium-save,
        .dream-mode .btn-premium-update,
        .dream-mode .btn-dark {
            background: linear-gradient(135deg, #ff99c8 0%, #ff70ab 100%) !important;
            box-shadow: 0 4px 10px rgba(255, 153, 200, 0.3) !important;
            color: #fff !important;
            border-radius: 20px !important;
        }

        .btn-premium-close {
            flex: 1;
            background: rgba(255, 255, 255, 0.1);
            color: #94a3b8;
            border: 1px solid rgba(255, 255, 255, 0.1);
            padding: 12px;
            border-radius: 10px;
            font-weight: 600;
            cursor: pointer;
        }

        :root {
            /* Light Mode Variables (Default Dashboard White) */
            --bg-body: #f1f5f9;
            --text-main: #334155;
            --text-title: #0f172a;
            --text-sub: #64748b;
            --bg-card: #ffffff;
            --bg-modal: rgba(255, 255, 255, 0.98);
            --border-card: #e2e8f0;
            --border-card-hover: #cbd5e1;
            --border-modal: rgba(0, 0, 0, 0.1);
            --bg-input: #f8fafc;
            --text-input: #1e293b;
            --bg-option: #f1f5f9;
            --text-option: #64748b;
            --bg-link: #e2e8f0;
            --text-link: #475569;
            --bg-link-hover: #cbd5e1;
            --text-link-hover: #1e293b;
            --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
            --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
            --btn-master-bg: rgba(255, 255, 255, 0.95);
            --btn-master-text: #1e293b;
            --btn-master-lock: #cbd5e1;
            --btn-master-lock-text: #0f172a;
            --bg-history-contribution: #f1fef6;
            --text-history-contribution: #059669;
            --brand-pink: #ff4785;
            --brand-blue: #3b82f6;
        }

        .dark-mode {
            /* Dark Mode Variables (Premium Tuber Dark) */
            --bg-body: #0f172a;
            --text-main: #f8fafc;
            --text-title: #ffffff;
            --text-sub: #94a3b8;
            --bg-card: #1e293b;
            --bg-modal: rgba(15, 23, 42, 0.95);
            --border-card: #334155;
            --border-card-hover: #475569;
            --border-modal: rgba(255, 255, 255, 0.1);
            --bg-input: rgba(255, 255, 255, 0.05);
            --text-input: #ffffff;
            --bg-option: rgba(255, 255, 255, 0.03);
            --text-option: #94a3b8;
            --bg-link: rgba(255, 255, 255, 0.05);
            --text-link: #94a3b8;
            --bg-link-hover: rgba(255, 255, 255, 0.1);
            --text-link-hover: #ffffff;
            --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
            --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
            --btn-master-bg: rgba(30, 41, 59, 0.95);
            --btn-master-text: #ffffff;
            --btn-master-lock: #334155;
            --btn-master-lock-text: #f8fafc;
            --bg-history-contribution: rgba(16, 185, 129, 0.15);
            --text-history-contribution: #34d399;
        }

        .dream-mode {
            /* Dream Mode Variables (Cute Ice Cream) */
            --bg-body: #ffebf1;
            --text-main: #5a4a5e;
            --text-title: #7E5F86;
            --text-sub: #8a7a8e;
            --bg-card: #ffffff;
            --bg-modal: rgba(255, 255, 255, 0.98);
            --border-card: #ffe4e8;
            --border-card-hover: #E8A6B2;
            --border-modal: rgba(255, 153, 200, 0.1);
            --bg-input: #fffcfd;
            --text-input: #4a3a4e;
            --bg-option: #fff0f3;
            --text-option: #ff99c8;
            --bg-link: #ffe4e8;
            --text-link: #ff8fab;
            --bg-link-hover: #ffcad4;
            --text-link-hover: #ff4785;
            --shadow-card: 0 8px 16px -4px rgba(255, 153, 200, 0.15);
            --shadow-modal: 0 20px 25px -5px rgba(255, 153, 200, 0.2);
            --btn-master-bg: rgba(255, 245, 248, 0.95);
            --btn-master-text: #ff4785;
            --btn-master-lock: #ffcad4;
            --btn-master-lock-text: #ff4785;
            --bg-history-contribution: #f0fff4;
            --text-history-contribution: #059669;
            --brand-pink: #ff99c8;
            --brand-blue: #7C67C8;
            /* Mint Ice Cream */
        }

        /* Dream Mode Mongol-Mongol Feeling Overrides */
        .dream-mode li,
        .dream-mode .sidebar,
        .dream-mode .chat-console,
        .dream-mode .donation-form,
        .dream-mode .modal-content,
        .dream-mode .recipient-item label {
            border-radius: 22px !important;
            border-width: 2px !important;
            box-shadow: var(--shadow-card) !important;
        }

        .dream-mode .btn-master,
        .dream-mode .btn-show,
        .dream-mode .btn-hide,
        .dream-mode .btn-full,
        .dream-mode input,
        .dream-mode select,
        .dream-mode .selector-item,
        .dream-mode .donation-form button {
            border-radius: 12px !important;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Dream Mode Component Glows & Pastel Effects */
        .dream-mode .btn-master:hover,
        .dream-mode .btn-show:hover,
        .dream-mode .btn-hide:hover {
           /* box-shadow: 0 0 15px rgba(255, 153, 200, 0.4) !important;
            transform: translateY(-0px); */
        }

        .dream-mode .btn-show {
            background: linear-gradient(135deg, #ffffff 0%, #FFA9A9 100%) !important;
            color: #eb5353 !important;
            border: 1px solid #fdb3d5 !important;
            box-shadow: 0 4px 10px rgba(160, 231, 229, 0.4) !important;
            font-weight: 800 !important;
            border-radius: 22px !important;
        }

        .dream-mode .btn-show:hover {
            box-shadow: 0 0 15px rgba(160, 231, 229, 0.6) !important;
            transform: translateY(-2px);
        }

        .dream-mode .btn-hide {
            background: linear-gradient(135deg, #eeffca 0%, #94d49c 100%) !important;
            color: #447a58 !important;
            border: 1px solid #a1ce77 !important;
            box-shadow: 0 4px 10px rgba(255, 202, 212, 0.4) !important;
            font-weight: 800 !important;
            border-radius: 22px !important;
        }

        .dream-mode .btn-hide:hover {
            box-shadow: 0 0 15px rgba(255, 177, 191, 0.6) !important;
            transform: translateY(-2px);
        }

        /* Override Active States for Dream Mode Console Buttons */
        .dream-mode .btn-show.active {
            box-shadow: 0 0 18px rgba(160, 231, 229, 0.8) !important;
            border-width: 2px !important;
        }

        .dream-mode .btn-hide.active {
            box-shadow: 0 0 18px rgba(255, 153, 200, 0.8) !important;
            border-width: 2px !important;
        }

        .dream-mode .btn-hide.active {
            background: #ffcad4 !important;
            /* Pink */
            color: #5a4a5e !important;
            border-color: #ff99c8 !important;
            box-shadow: 0 0 12px rgba(255, 153, 200, 0.5) !important;
        }

        .dream-mode .selector-item:hover {
            border-color: #ff99c8 !important;
            background: #fffafa !important;
            box-shadow: 0 8px 20px rgba(255, 153, 200, 0.3) !important;
        }

        .dream-mode .selector-item i {
            transition: all 0.3s ease;
        }

        .dream-mode .selector-item:hover i {
            color: #ff99c8 !important;
            text-shadow: 0 0 10px rgba(255, 153, 200, 0.5);
            transform: scale(1.1);
        }

        .dream-mode input:focus,
        .dream-mode select:focus {
            border-color: #ff99c8 !important;
            box-shadow: 0 0 8px rgba(255, 153, 200, 0.4) !important;
            background: #fffdfd !important;
        }

        /* ----- Master Header & Controls ----- */
        .master-header {
            position: sticky !important;
            top: 0;
            width: 100%;
            box-sizing: border-box;
            z-index: 1000;
            background: var(--bg-card);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            padding: 12px 25px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
            border-bottom: 1px solid var(--border-card);
            transition: all 0.3s ease;
        }

        /* Fixed background opacity for semi-transparent header */
        .dark-mode .master-header { background: rgba(30, 41, 59, 0.8) !important; }
        .dream-mode .master-header { background: rgba(255, 235, 241, 0.8) !important; }

        .master-header h1 {
            margin: 0 !important;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .master-controls {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .btn-master {
            background: var(--bg-link);
            color: var(--text-link);
            border: 1px solid var(--border-modal);
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 8px;
            border-radius: 12px;
            font-weight: 800;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            font-family: 'NanumSquare', sans-serif;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }

        .btn-master:hover {
            background: var(--bg-link-hover);
            color: var(--text-link-hover);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }

        .btn-master:active {
            transform: scale(0.96);
        }

        .btn-master-lock {
            background: var(--btn-master-lock);
            color: var(--btn-master-lock-text);
        }
        
        .btn-master-lock.unlocked {
            background: var(--brand-blue);
            color: white;
            border-color: var(--brand-blue);
        }

        /* Responsive Mobile Header Optimization */
        @media (max-width: 768px) {
            .master-header {
                padding: 10px 15px;
            }
            .btn-text {
                display: none !important;
            }
            .btn-master {
                padding: 8px 10px;
                border-radius: 10px;
            }
            .master-header h1 img {
                width: 100px !important;
            }
            .master-header .btn-text {
                display: none;
            }
        }

        body {
            font-family: 'NanumSquare', sans-serif;
            padding: 0;
            margin: 0;
            background: var(--bg-body);
            color: var(--text-main);
            line-height: 1;
            transition: background-color 0.3s, color 0.3s;
            min-height: 100vh;
        }

        h1 {
            font-size: 1.6rem;
            margin-bottom: 15px;
            letter-spacing: -1px;
            color: var(--text-title);
            transition: color 0.3s;
        }

        p.main-desc {
            font-size: 0.85rem;
            color: var(--text-sub);
            margin-bottom: 25px;
            transition: color 0.3s;
        }

        ul {
            list-style: none;
            padding: 0;
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
        }

        li {
            background: var(--bg-card);
            padding: 12px;
            border-radius: 8px;
            box-shadow: var(--shadow-card);
            width: 280px;
            display: flex;
            flex-direction: column;
            position: relative;
            transition: border-color 0.2s, box-shadow 0.2s, background-color 0.3s;
            border: 1px solid var(--border-card);
        }

        li:hover {
            box-shadow: var(--shadow-card-hover);
            border-color: var(--border-card-hover);
        }

        strong {
            font-size: 0.9rem;
            display: block;
            margin-bottom: 6px;
            color: var(--text-title);
            font-weight: bold;
            letter-spacing: 0px;
        }

        li p {
            font-size: 0.8rem;
            color: var(--text-sub);
            margin-bottom: 12px;
            flex-grow: 1;
        }

        .links {
            display: flex;
            gap: 4px;
            margin-bottom: 8px;
        }

        a {
            display: inline-block;
            padding: 3px 8px;
            background: transparent;
            color: var(--text-sub);
            text-decoration: none;
            border-radius: 4px;
            font-size: 10px;
            font-weight: normal;
            border: 1px solid var(--border-card);
            transition: all 0.2s;
        }

        a:hover {
            background: var(--bg-link);
            color: var(--text-link);
            border-color: var(--bg-link);
        }

        .status-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 9px;
            font-weight: 800;
            margin-left: 5px;
            vertical-align: middle;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .status-on {
            background: #ef4444;
            color: #fff;
        }

        .status-off {
            background: #4c5250ff;
            color: #fff;
        }

        .btn-group {
            display: flex;
            gap: 4px;
            margin-top: 6px;
        }

        .btn-group button {
            flex: 1;
            border: 1px solid transparent;
            color: #fff;
            padding: 6px 4px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: bold;
            cursor: pointer;
            font-family: 'NanumSquare', sans-serif;
            transition: all 0.2s;
        }

        .btn-group button:hover {
            filter: brightness(0.95);
        }

        .btn-show {
            background: #ef4444 !important;
            color: #ffffff !important;
            border: none !important;
        }

        .btn-show:hover {
            background: #dc2626 !important;
        }

        .btn-hide {
            background: #07593eff !important;
            color: #ffffff !important;
            border: none !important;
        }

        .btn-hide:hover {
            background: #00583cc2 !important;
        }

        .btn-inactive {
            background: #2b3c56 !important;
            color: #f8fafc !important;
        }

        .btn-inactive:hover {
            background: #64748b !important;
        }

        .btn-full {
            width: 100%;
            margin-top: 6px;
            border: none;
            background: #ef4444;
            color: #fff;
            padding: 8px;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: bold;
            cursor: pointer;
            font-family: 'NanumSquare', sans-serif;
            transition: all 0.2s;
        }

        .btn-full:hover {
            background: #dc2626;
        }

        /* ----- Modal Styles ----- */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(5px);
            z-index: 9999;
            justify-content: center;
            align-items: center;
        }

        .modal-content {
            background: var(--bg-modal);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            padding: 30px;
            border-radius: 20px;
            width: 90%;
            max-width: 480px;
            box-shadow: var(--shadow-modal);
            border: 1px solid var(--border-modal);
            color: var(--text-main);
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            border-bottom: 1px solid var(--border-modal);
            padding-bottom: 15px;
        }

        .modal-header h3 {
            margin: 0;
            font-size: 1.3rem;
            color: var(--text-title);
            font-weight: 800;
        }

        .modal-body label {
            display: block;
            margin-bottom: 6px;
            font-weight: bold;
            font-size: 0.85rem;
            color: var(--text-sub);
        }

        .modal-body input,
        .modal-body textarea,
        .modal-body select {
            box-sizing: border-box;
        }

        .modal-body input:not(.overlay-input),
        .modal-body textarea:not(.overlay-input) {
            width: 100%;
            padding: 12px;
            margin-bottom: 20px;
            background: var(--bg-input);
            border: 1px solid var(--border-modal);
            border-radius: 8px;
            font-size: 0.9rem;
            color: var(--text-input);
            font-family: 'NanumSquare', sans-serif;
            transition: all 0.2s;
        }

        /* ----- Overlay Admin Table Styles ----- */
        .overlay-admin-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            font-size: 0.8rem;
            margin-top: 10px;
        }

        .overlay-admin-table th {
            background: var(--bg-option);
            padding: 8px 2px;
            text-align: center;
            border-bottom: 2px solid var(--border-modal);
            color: var(--text-sub);
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-size: 0.75rem;
        }

        .overlay-row td {
            padding: 4px 2px;
            border-bottom: 1px solid var(--border-modal);
            vertical-align: middle;
            background: transparent;
            box-sizing: border-box;
        }

        .overlay-row:hover td {
            background: var(--bg-option);
        }

        .overlay-input {
            background: var(--bg-input);
            border: 1px solid var(--border-modal);
            border-radius: 4px;
            color: var(--text-input);
            padding: 3px 4px;
            font-size: 0.75rem;
            transition: all 0.2s;
            font-family: inherit;
            box-sizing: border-box;
        }

        .overlay-input:focus {
            outline: none;
            border-color: var(--brand-blue);
            box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
        }

        .content-textarea {
            width: 100%;
            resize: vertical;
            min-height: 40px;
            line-height: 1.3;
            display: block;
            margin-bottom: 0px;
            /* 불필요 여백 제거 */
        }

        .input-group-mini {
            display: inline-flex;
            align-items: center;
            background: var(--bg-input);
            border-radius: 4px;
            padding: 1px 4px;
            border: 1px solid var(--border-modal);
            height: 24px;
            box-sizing: border-box;
        }

        .input-group-mini .label {
            font-size: 0.65rem;
            color: var(--text-sub);
            margin-right: 6px;
            font-weight: bold;
            user-select: none;
        }

        .input-group-mini .overlay-input {
            background: transparent;
            border: none;
            padding: 0;
            margin: 0;
            height: 100%;
            box-shadow: none;
            color: var(--text-input);
        }

        .input-group-mini .unit {
            font-size: 0.65rem;
            color: var(--text-sub);
            margin-left: 4px;
            opacity: 0.7;
        }

        .badge-type-text,
        .badge-type-img {
            display: inline-flex;
            align-items: center;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 0.65rem;
            font-weight: 800;
            white-space: nowrap;
        }

        .badge-type-text {
            background: rgba(59, 130, 246, 0.15);
            color: #3b82f6;
            border: 1px solid rgba(59, 130, 246, 0.3);
        }

        .badge-type-img {
            background: rgba(16, 185, 129, 0.15);
            color: #10b981;
            border: 1px solid rgba(16, 185, 129, 0.3);
        }

        .overlay-img-preview {
            width: 44px;
            height: 44px;
            object-fit: contain;
            background: var(--bg-input);
            border-radius: 6px;
            border: 1px solid var(--border-modal);
            flex-shrink: 0;
        }

        .overlay-input-file {
            font-size: 0.7rem;
            color: var(--text-sub);
            width: 100%;
        }

        .overlay-input-file::-webkit-file-upload-button {
            background: var(--bg-link);
            color: var(--text-link-hover);
            border: 1px solid var(--border-modal);
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.7rem;
            cursor: pointer;
            margin-right: 8px;
            transition: all 0.2s;
        }

        .overlay-input-file::-webkit-file-upload-button:hover {
            background: var(--bg-link-hover);
        }

        .btn-overlay-del {
            background: rgba(239, 68, 68, 0.1);
            color: #ef4444;
            border: 1px solid rgba(239, 68, 68, 0.2);
            padding: 5px 10px;
            border-radius: 6px;
            font-size: 0.7rem;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-overlay-del:hover {
            background: #ef4444;
            color: white;
            border-color: #ef4444;
        }

        .modal-body input:focus,
        .modal-body textarea:focus {
            outline: none;
            border-color: var(--brand-blue);
            box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
        }

        .modal-footer {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            margin-top: 20px;
        }

        .btn-modal-save {
            background: var(--brand-blue);
            color: #fff;
            border: none;
            padding: 10px 25px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.2s;
        }

        .btn-modal-save:hover {
            background: #2563eb;
            transform: translateY(-1px);
        }

        .btn-modal-close {
            background: var(--bg-link);
            color: var(--text-link);
            border: 1px solid var(--border-modal);
            padding: 10px 25px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-modal-close:hover {
            background: var(--bg-link-hover);
            color: var(--text-link-hover);
        }

        /* ----- Restricted Widget (Level 4 - Pro Membership) ----- */
        .widget-restricted {
            position: relative !important;
            pointer-events: none !important;
            user-select: none;
        }

        .widget-restricted::after {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.12);
            backdrop-filter: blur(2px);
            border-radius: inherit;
            /* Perfect match with parent 22px in Dream Mode */
            z-index: 100;
        }

        .widget-restricted::before {
            content: "Pro Membership";
            position: absolute;
            top: 10px;
            left: 10px;
            background: var(--brand-pink);
            color: #fff;
            padding: 4px 10px;
            font-size: 10px;
            font-weight: 800;
            border-radius: 8px;
            /* More Mongol-Mongol */
            z-index: 101;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            box-shadow: 0 4px 8px rgba(255, 153, 200, 0.3);
        }

        .widget-restricted>* {
            opacity: 0.4 !important;
            /* 배경 요소를 살짝 더 보이게 */
        }

        /* ----- Main Layout ----- */
        .main-wrapper {
            display: flex;
            gap: 10px;
            align-items: stretch;
            padding: 0 15px 15px 15px;
            max-width: 1400px;
            margin-left: 0;
            margin-right: auto;
        }

        .widget-section {
            flex: 0 0 auto;
        }

        .widget-list {
            display: grid;
            grid-template-columns: repeat(2, 190px);
            gap: 10px;
            margin-top: 0px;
            width: fit-content;
        }

        .widget-list li {
            width: 100%;
            min-width: 185px;
            max-width: 220px;
            box-sizing: border-box;
        }

        /* ----- Sidebar (Donation/Ranking) ----- */
        .sidebar {
            width: 100%;
            max-width: 300px;
            min-width: 300px;
            background: var(--bg-card);
            border: 1px solid var(--border-card);
            padding: 15px;
            border-radius: 8px;
            box-shadow: var(--shadow-card);
            position: sticky;
            top: 10px;
            transition: all 0.3s ease;
        }

        .sidebar h2 {
            border-bottom: 1px solid var(--border-card);
            padding-bottom: 8px;
            color: var(--text-title);
            font-size: 0.9rem;
            letter-spacing: 0px;
            font-weight: 400;
        }

        /* ----- Chat Console (Right) ----- */
        .recipient-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 4px;
            margin-bottom: 8px;
        }

        .recipient-item {
            position: relative;
        }

        .recipient-item input[type="radio"] {
            display: none;
        }

        .recipient-item label {
            display: block;
            background: var(--bg-link);
            color: var(--text-link);
            padding: 6px 2px;
            text-align: center;
            border-radius: 6px;
            font-size: 0.75rem;
            cursor: pointer;
            border: 1px solid var(--border-modal);
            transition: all 0.2s;
            margin: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .recipient-item label:hover {
            background: var(--bg-link-hover);
            color: var(--text-link-hover);
        }

        .recipient-item input[type="radio"]:checked+label {
            background: rgba(59, 130, 246, 0.15);
            color: var(--brand-blue);
            border-color: var(--brand-blue);
            font-weight: bold;
        }

        .chat-console {
            flex: 1;
            background: var(--bg-card);
            border: 1px solid var(--border-card);
            padding: 15px;
            max-width: 480px;
            min-width: 380px;
            border-radius: 8px;
            box-shadow: var(--shadow-card);
            position: sticky;
            top: 10px;
            display: flex;
            flex-direction: column;
            transition: all 0.3s ease;
        }

        .chat-console.is-landscape {
            max-width: 420px;
            min-width: 420px;
        }

        .chat-console h2 {
            font-size: 0.9rem;
            margin-bottom: 5px;
            display: flex;
            align-items: center;
            gap: 8px;
            border-bottom: 1px solid var(--border-card);
            padding-bottom: 5px;
            color: var(--text-title);
            letter-spacing: 0px;
            font-weight: 400;
        }

        .chat-messages {
            height: 380px;
            background: var(--bg-body);
            border: 1px solid var(--border-card);
            border-radius: 12px;
            overflow: hidden;
            margin-bottom: 10px;
            font-size: 0.85rem;
        }

        .chat-messages::-webkit-scrollbar {
            width: 6px;
        }

        .chat-messages::-webkit-scrollbar-thumb {
            background: var(--border-card-hover);
            border-radius: 10px;
        }

        .chat-msg-item {
            padding: 4px 0;
            border-bottom: 1px solid var(--border-card);
            line-height: 1.4;
        }

        .chat-msg-user {
            color: var(--brand-blue);
            font-weight: bold;
            cursor: pointer;
            margin-right: 4px;
            text-decoration: underline;
            text-decoration-color: rgba(79, 172, 254, 0.3);
        }

        .chat-msg-user:hover {
            color: #60a5fa;
        }

        .chat-msg-text {
            color: #d0d0d0;
        }

        .chat-presets {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 10px;
        }

        .btn-preset {
            padding: 4px 10px;
            background: var(--bg-link);
            border: 1px solid transparent;
            border-radius: 20px;
            font-size: 0.75rem;
            color: var(--text-link);
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-preset:hover {
            background: var(--bg-link-hover);
            color: var(--text-link-hover);
            box-shadow: none;
        }

        .sig-recommendations {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-bottom: 10px;
            max-height: 76px;
            overflow-y: auto;
            background: var(--bg-body);
            padding: 8px;
            border-radius: 8px;
            border: 1px dashed var(--border-card);
            transition: background-color 0.3s, border-color 0.3s;
        }

        .sig-item {
            font-size: 0.7rem;
            background: var(--bg-link);
            border: 1px solid transparent;
            padding: 2px 8px;
            border-radius: 12px;
            cursor: pointer;
            color: var(--text-link);
            white-space: nowrap;
            transition: all 0.2s;
        }

        .sig-item:hover {
            background: var(--bg-link-hover);
            color: var(--text-link-hover);
            box-shadow: none;
        }

        .console-label {
            font-size: 0.75rem;
            color: #475569;
            margin-bottom: 4px;
            font-weight: 800;
            display: block;
        }

        .chat-input-area {
            display: flex;
            gap: 8px;
        }

        .chat-input-area input {
            flex: 1;
            padding: 10px;
            background: var(--bg-body);
            border: 1px solid var(--border-card);
            border-radius: 8px;
            font-family: 'NanumSquare', sans-serif;
            font-size: 0.9rem;
            color: var(--text-main);
            transition: border-color 0.2s, box-shadow 0.2s;
            box-sizing: border-box;
        }

        .chat-input-area input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
        }

        .chat-input-area button {
            padding: 10px 20px;
            background: #2563eb;
            color: #fff;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: bold;
            font-family: 'NanumSquare', sans-serif;
            transition: all 0.2s;
        }

        .chat-input-area button:hover {
            background: #1d4ed8;
        }

        .sidebar-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.75rem;
            margin-bottom: 5px;
        }

        .sidebar-table th {
            text-align: left;
            color: var(--text-sub);
            padding-bottom: 3px;
            border-bottom: 1px solid var(--border-card);
        }

        .sidebar-table th,
        .sidebar-table td {
            padding: 4px 4px;
            border-bottom: 1px solid var(--border-card);
            font-size: 0.75rem;
            color: var(--text-main);
        }

        .sidebar-table td.point {
            font-weight: bold;
            text-align: right;
            color: #059669;
        }

        .sidebar-table td.contribution {
            text-align: right;
            font-size: 0.75rem;
            color: #d97706;
        }

        .sidebar-table td.extra {
            text-align: right;
            font-size: 0.75rem;
            color: var(--text-sub);
        }

        /* Sponsorship History List */
        .history-list {
            margin-top: 10px;
            font-size: 0.75rem;
            height: 200px;
            overflow-y: auto;
            background: var(--bg-body);
            border: 1px solid var(--border-card);
            border-radius: 8px;
            box-sizing: border-box;
            padding: 0;
            color: var(--text-main);
        }

        /* Custom Scrollbar for History */
        .history-list::-webkit-scrollbar {
            width: 4px;
        }

        .history-list::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 10px;
        }

        #sidebar-history-body {
            display: flex;
            flex-direction: column;
        }

        .history-item {
            display: flex;
            flex-direction: column;
            gap: 2px;
            padding: 4px 8px;
            border-bottom: 1px solid var(--border-card);
            font-size: 0.70rem;
            line-height: 1.2;
            flex-shrink: 0;
        }

        .history-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
        }

        .history-row.top {
            color: #64748b;
            font-size: 0.75rem;
            margin-bottom: -5px
        }

        .history-row.bottom {
            font-weight: bold;
            padding-bottom: 2px;

        }

        .history-item .btn-play-mini {
            margin-left: 0;
            flex-shrink: 0;
            margin-top: 3px;
        }

        .history-item.is-contribution {
            border-left: 4px solid var(--text-history-contribution);
            background: var(--bg-history-contribution);
            padding: 6px 10px;
            line-height: 1.4;
        }

        .history-item.is-active {
            background: rgba(251, 191, 36, 0.15) !important;
            border-left: 4px solid #f59e0b;
            box-shadow: inset 0 0 10px rgba(245, 158, 11, 0.1);
        }

        .history-item.is-contribution .content,
        .history-item.is-contribution .time {
            color: var(--text-history-contribution);
        }

        .history-item .time {
            color: var(--text-sub);
            flex-shrink: 0;
            font-family: monospace;
            font-size: 0.7rem;
            opacity: 0.8;
        }

        .history-item .time small {
            font-size: 0.65rem;
            opacity: 0.7;
        }

        .history-item .content {
            color: var(--text-main);
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            margin-top: 5px;
        }

        .history-item .val-p {
            color: #dc3545;
            font-weight: bold;
            flex-shrink: 0;
        }

        .history-item .val-c {
            color: #28a745;
            font-weight: bold;
            flex-shrink: 0;
        }
        }

        /* Sponsorship Form */
        .donation-form {
            background: var(--bg-card);
            padding: 10px;
            border: 1px solid var(--border-card);
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            /* reverted to 8px as 3px was too squished */
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            margin-top: 5px;
            transition: background-color 0.3s, border-color 0.3s;
        }

        .form-row {
            display: flex;
            gap: 8px;
            width: 100%;
        }

        .donation-form input {
            padding: 8px 12px;
            background: var(--bg-input);
            border: 1px solid var(--border-card);
            border-radius: 8px;
            font-size: 0.9rem;
            color: var(--text-input);
            font-family: inherit;
            transition: all 0.2s;
            box-sizing: border-box;
            margin-bottom: 8px;
            -moz-appearance: textfield;
        }

        .donation-form input::-webkit-outer-spin-button,
        .donation-form input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        .donation-form input:focus {
            border-color: var(--brand-blue);
            outline: none;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
            background: var(--bg-card);
        }

        .donation-form .btn-submit {
            background: #2563eb;
            color: white;
            border: none;
            padding: 12px;
            border-radius: 8px;
            font-weight: bold;
            cursor: pointer;
            transition: background 0.2s;
        }

        .donation-form .btn-submit:hover {
            background: #1d4ed8;
        }

        .btn-send-donation {
            width: 100%;
            padding: 12px;
            background: #10b981;
            color: #fff;
            border: none;
            border-radius: 8px;
            font-weight: bold;
            cursor: pointer;
            font-size: 0.95rem;
            transition: background 0.2s;
        }

        .btn-send-donation:hover {
            background: #059669;
        }

        .btn-play-mini {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            background: #6c757d;
            color: #fff;
            border-radius: 50%;
            font-size: 10px;
            cursor: pointer;
            margin-left: 5px;
            transition: background 0.2s;
            border: none;
            padding: 0;
            vertical-align: middle;
        }

        .btn-play-mini:hover {
            background: #28a745;
        }

        /* ----- Master Header ----- */
        .master-header {
            display: none;
            /* 위젯으로 이동했으므로 숨김 */
        }

        .btn-master:active {
            transform: scale(0.98);
        }

        .btn-master:hover {
            filter: brightness(0.95);
        }

        .btn-master-show {
            background: #10b981;
        }

        .btn-master-hide {
            background: #ef4444;
        }

        .btn-master-lock {
            background: var(--bg-link);
            color: var(--text-title) !important;
            border: 1px solid var(--border-modal) !important;
        }

        .btn-master-lock:hover {
            background: var(--bg-link-hover);
        }

        .btn-master-lock.unlocked {
            background: var(--brand-pink) !important;
            color: white !important;
            border-color: var(--brand-pink) !important;
            box-shadow: 0 4px 12px rgba(255, 71, 133, 0.3);
        }

        .drag-handle {
            position: absolute;
            top: 15px;
            right: 15px;
            cursor: grab;
            color: var(--text-sub);
            font-size: 1.2rem;
            display: none;
            opacity: 0.5;
            transition: opacity 0.2s;
        }

        .drag-handle:hover {
            opacity: 1;
        }

        .sortable-unlocked .widget-list li {
            border: 2px dashed var(--brand-blue);
            background: rgba(59, 130, 246, 0.05);
        }

        /* ----- Empty Slot Style ----- */
        .empty-slot {
            display: none;
            border: 2px dashed var(--border-card) !important;
            background: var(--bg-option) !important;
            min-height: 120px;
            justify-content: center;
            align-items: center;
            cursor: pointer !important;
            transition: all 0.2s;
            border-radius: 12px;
        }

        .sortable-unlocked .empty-slot {
            display: flex;
        }

        .empty-slot:hover {
            border-color: var(--brand-blue) !important;
            background: rgba(59, 130, 246, 0.05) !important;
            transform: scale(1.02);
        }

        .empty-slot i {
            font-size: 1.5rem;
            color: var(--brand-blue);
            margin-bottom: 8px;
        }

        .empty-slot span {
            font-size: 0.8rem;
            color: var(--text-sub);
            font-weight: 600;
        }

        /* ----- Widget Action Buttons ----- */
        .widget-del-btn {
            position: absolute;
            top: -10px;
            right: -10px;
            width: 24px;
            height: 24px;
            background: #ef4444;
            color: #fff;
            border-radius: 50%;
            display: none;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            cursor: pointer;
            z-index: 110;
            border: 2px solid var(--bg-card);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
            transition: all 0.2s;
            pointer-events: auto !important;
        }

        .widget-del-btn:hover {
            transform: scale(1.1);
            background: #dc2626;
        }

        .sortable-unlocked .widget-del-btn {
            display: flex;
            z-index: 110 !important;
            /* Ensure it stays above pro overlay and badge */
        }

        .sortable-unlocked .drag-handle {
            display: block;
            color: var(--brand-blue);
        }

        /* Fixed Widget Styles */
        .widget-static .drag-handle,
        .widget-static .widget-del-btn {
            display: none !important;
        }

        /* 위젯 선택 모달 내부 그리드 */
        .widget-selector-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
            margin-top: 15px;
        }

        .selector-item {
            background: var(--bg-option);
            border: 1px solid var(--border-modal);
            border-radius: 12px;
            padding: 20px 10px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .selector-item:hover {
            background: rgba(59, 130, 246, 0.1);
            border-color: var(--brand-blue);
            transform: translateY(-3px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }

        .selector-item>i:not(.info-tip) {
            display: block;
            font-size: 1.8rem;
            margin-bottom: 10px;
            color: var(--brand-blue);
        }

        .selector-item span {
            font-size: 0.8rem;
            font-weight: 700;
            color: var(--text-main);
        }

        /* Toolkit & Badges */
        .selector-item {
            position: relative;
        }

        .info-tip {
            position: absolute;
            top: 10px;
            right: 10px;
            color: var(--text-sub);
            font-size: 0.7rem !important;
            /* Smaller size */
            cursor: help;
            transition: all 0.2s;
            z-index: 5;
            opacity: 0.6;
        }

        .info-tip:hover {
            color: var(--brand-blue);
            opacity: 1;
            transform: scale(1.1);
        }

        /* Tooltip behavior */
        .info-tip[title]:hover::after {
            content: attr(title);
            position: absolute;
            bottom: 110%;
            right: 0;
            background: rgba(0, 0, 0, 0.85);
            color: white;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 0.75rem;
            white-space: nowrap;
            z-index: 100;
            backdrop-filter: blur(4px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }

        .pro-badge {
            position: absolute;
            top: 8px;
            left: 8px;
            background: linear-gradient(135deg, #f59e0b, #fbbf24);
            color: #000;
            font-size: 10px;
            font-weight: 900;
            padding: 2px 5px;
            border-radius: 4px;
            box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
            text-transform: uppercase;
        }

        .selector-item.is-pro {
            border-color: rgba(245, 158, 11, 0.3);
        }

        .selector-item.is-pro i {
            color: #f59e0b;
        }

        @media (max-width: 768px) {
            .btn-text {
                display: none !important;
            }

            .btn-master {
                padding: 5px 6px;
            }

            .master-header h1 {
                font-size: 1.1rem;
            }

            .master-header>h1>span {
                display: block;
                margin-top: 5px;
                margin-left: 0 !important;
            }
        }

        /* ----- License Expired Lock Style ----- */
        body.license-expired {
            overflow: hidden;
            pointer-events: none;
        }

        body.license-expired .master-header,
        body.license-expired .master-header * {
            pointer-events: auto;
        }
/* 단축키 배지 스타일 */
.lv-btn, .btn-action, .btn-vs, .battle-btn, .btn_timer_control, .btn-show, .btn-hide, .btn-full { position: relative !important; }
.shortcut-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f59e0b;
    color: #000;
    font-size: 10px;
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    pointer-events: none;
    z-index: 10;
    border: 1px solid #000;
    display: none;
}
.shortcut-badge.active { display: block; }

.shortcut-assign-mode {
    outline: 2px dashed #f59e0b !important;
    animation: sc-pulse 1.5s infinite;
}
@keyframes sc-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.shortcut-pulse {
    animation: shortcut-flash 0.3s ease-out;
    position: relative;
    overflow: hidden;
}
@keyframes shortcut-flash {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.05); filter: brightness(1.8); box-shadow: 0 0 15px #f59e0b; }
    100% { transform: scale(1); filter: brightness(1); }
}

/* 단축키 설정 창 5열 그리드 레이아웃 */
#shortcut-list-container {
    display: grid !important;
    grid-template-columns: repeat(10, 1fr) !important;
    gap: 5px !important;
    padding: 15px !important;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.shortcut-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    text-align: center;
}

.shortcut-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.shortcut-label {
    font-size: 0.75rem;
    color: #cbd5e1;
    font-weight: 700;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.shortcut-btn {
    width: 100%;
    min-width: unset !important;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 4px !important;
    border-radius: 6px;
    font-size: 0.7rem !important;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 800;
}

.shortcut-btn.capturing {
    background: #f59e0b !important;
    color: #000 !important;
    border-color: #f59e0b !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
    animation: shortcut-blink 1s infinite;
}

@keyframes shortcut-blink {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

@media (max-width: 1000px) {
    #shortcut-list-container {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 600px) {
    #shortcut-list-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* 그룹별 미세 색상 구분 */
.shortcut-item.sc-group-sound {
    border-color: rgba(139, 92, 246, 0.3) !important;
    background: rgba(139, 92, 246, 0.05) !important;
}
.shortcut-item.sc-group-sound .shortcut-label { color: #c4b5fd; }
.shortcut-item.sc-group-sound .shortcut-btn { border-color: rgba(139, 92, 246, 0.2); }

.shortcut-item.sc-group-number {
    border-color: rgba(16, 185, 129, 0.3) !important;
    background: rgba(16, 185, 129, 0.05) !important;
}
.shortcut-item.sc-group-number .shortcut-label { color: #a7f3d0; }
.shortcut-item.sc-group-number .shortcut-btn { border-color: rgba(16, 185, 129, 0.2); }

.shortcut-item.sc-group-video {
    border-color: rgba(59, 130, 246, 0.3) !important;
    background: rgba(59, 130, 246, 0.05) !important;
}
.shortcut-item.sc-group-video .shortcut-label { color: #bfdbfe; }
.shortcut-item.sc-group-video .shortcut-btn { border-color: rgba(59, 130, 246, 0.2); }

.shortcut-item.sc-group-utility {
    border-color: rgba(148, 163, 184, 0.2) !important;
    background: rgba(148, 163, 184, 0.03) !important;
}
.shortcut-item.sc-group-utility .shortcut-label { color: #94a3b8; }
