        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            scrollbar-width: none;
        }
        *::-webkit-scrollbar { display: none; }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: #000000;
            min-height: 100vh;
        }

        .login-container {
            background: rgba(20, 20, 20, 0.95);
            padding: 40px;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.1);
            width: 100%;
            max-width: 400px;
        }

        .logo {
            text-align: center;
            margin-bottom: 30px;
        }

        .logo h1 {
            color: #ffffff;
            font-size: 28px;
            margin-bottom: 10px;
        }

        .logo p {
            color: #c0c0c0;
            font-size: 14px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: #ffffff;
            font-weight: 500;
        }

        .form-group input, .form-group select {
            width: 100%;
            padding: 12px;
            border: 1px solid rgba(255,255,255,0.2);
            background: rgba(255,255,255,0.05);
            color: #ffffff;
            border-radius: 8px;
            font-size: 14px;
            transition: border-color 0.3s;
        }

        .form-group input:focus, .form-group select:focus {
            outline: none;
            border-color: #ffffff;
            background: rgba(255,255,255,0.1);
        }

        .btn {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
            color: #000000;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .btn:hover {
            transform: translateY(-2px);
        }

        .error-message, .success-message {
            padding: 10px;
            border-radius: 8px;
            margin-bottom: 20px;
            display: none;
        }

        .error-message {
            background: #fee;
            color: #c33;
        }

        .success-message {
            background: #efe;
            color: #3c3;
        }

        .dashboard {
            display: none;
            background: #000000;
            min-height: 100vh;
        }

        .dashboard-sticky-top {
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .dashboard-header {
            background: rgba(20, 20, 20, 0.98);
            border-bottom: 1px solid rgba(255,255,255,0.1);
            color: white;
            padding: 20px 40px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .user-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: white;
            padding: 2px;
        }

        .logout-btn {
            background: rgba(255,255,255,0.2);
            color: white;
            border: 2px solid white;
            padding: 8px 20px;
            border-radius: 20px;
            cursor: pointer;
            margin-left: 20px;
        }

        .dashboard-nav {
            background: rgba(20, 20, 20, 0.98);
            padding: 0 40px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }

        .nav-tabs {
            display: flex;
            gap: 5px;
        }

        .nav-tab {
            padding: 15px 25px;
            background: transparent;
            border: none;
            cursor: pointer;
            font-size: 15px;
            font-weight: 500;
            color: #c0c0c0;
            border-bottom: 3px solid transparent;
        }

        .nav-tab:hover {
            color: #ffffff;
        }

        .nav-tab.active {
            color: #ffffff;
            border-bottom-color: #ffffff;
        }

        /* 참여마당 탭 강조 — 깜빡이는 글로우 */
        #shareTabBtn:not(.active) {
            color: #7fdbff;
            font-weight: 600;
            animation: shareTabGlow 2s ease-in-out infinite;
        }
        #shareTabBtn.active {
            color: #fff;
            background: rgba(127,219,255,0.1);
            border-bottom-color: #7fdbff;
        }
        @keyframes shareTabGlow {
            0%, 100% { text-shadow: 0 0 4px rgba(127,219,255,0.3); }
            50% { text-shadow: 0 0 14px rgba(127,219,255,0.7), 0 0 28px rgba(127,219,255,0.3); color: #fff; }
        }

        .dashboard-content {
            padding: 40px;
            padding-bottom: 68px; /* 하단 status-bar(28px) 가림 방지 */
        }

        .tab-content {
            display: none;
        }

        /* 관계도: 부모 패딩을 무시하고 뷰포트 꽉 채움 */
        #graphTab {
            margin: -40px;
            margin-bottom: -68px;
            padding: 0;
            overflow: hidden;
        }
        #graphTab .content-frame {
            border-radius: 0;
            min-height: unset;
        }
        #graphTab:fullscreen {
            margin: 0;
            background: #0d0d0d;
        }
        #graphTab:fullscreen .content-frame {
            width: 100vw;
            height: 100vh;
        }

        .tab-content.active {
            display: block;
        }

        .content-frame {
            width: 100%;
            min-height: 400px;
            border: none;
            border-radius: 12px;
            background: white;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: rgba(20, 20, 20, 0.98);
            border: 1px solid rgba(255,255,255,0.1);
            padding: 40px;
            border-radius: 20px;
            max-width: 600px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
        }

        .modal-header {
            margin-bottom: 25px;
        }

        .modal-header h2 {
            color: #ffffff;
            font-size: 24px;
        }

        .avatar-style-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 15px;
            flex-wrap: wrap;
        }

        .avatar-style-tab {
            padding: 8px 16px;
            border: 2px solid rgba(255,255,255,0.2);
            border-radius: 20px;
            background: rgba(255,255,255,0.05);
            color: #ccc;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.3s;
        }

        .avatar-style-tab:hover {
            border-color: #667eea;
            color: #fff;
        }

        .avatar-style-tab.active {
            background: linear-gradient(135deg, #667eea, #764ba2);
            border-color: transparent;
            color: #fff;
            font-weight: bold;
        }

        .avatar-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
            max-height: 400px;
            overflow-y: auto;
            padding: 10px;
            border: 2px solid rgba(255,255,255,0.2);
            border-radius: 8px;
            margin-bottom: 20px;
        }

        .avatar-option {
            cursor: pointer;
            border: 3px solid transparent;
            border-radius: 50%;
            padding: 3px;
            transition: all 0.3s;
        }

        .avatar-option:hover {
            border-color: #667eea;
            transform: scale(1.1);
        }

        .avatar-option.selected {
            border-color: #764ba2;
        }

        .avatar-option.used {
            opacity: 0.3;
            cursor: not-allowed;
            position: relative;
        }

        .avatar-option.used::after {
            content: '사용중';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(0,0,0,0.8);
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: bold;
        }

        .avatar-option img {
            width: 100%;
            border-radius: 50%;
        }

        .admin-section {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            padding: 20px;
            border-radius: 12px;
            margin-bottom: 20px;
        }

        .admin-section h3 {
            margin-bottom: 15px;
            color: #ffffff;
        }

        .user-list {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
        }

        .user-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: #ffffff;
            padding: 15px 20px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }

        .user-item-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .user-item-info img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
        }

        .user-item-actions {
            display: flex;
            gap: 10px;
        }

        .btn-small {
            padding: 6px 12px;
            font-size: 13px;
            border-radius: 5px;
            border: none;
            cursor: pointer;
            transition: all 0.3s;
        }

        .btn-primary {
            background: #667eea;
            color: white;
        }

        .btn-danger {
            background: #e74c3c;
            color: white;
        }

        .btn-warning {
            background: #f39c12;
            color: white;
        }

        .btn-success {
            background: #27ae60;
            color: white;
        }

        .badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            margin-left: 10px;
        }

        .badge-admin {
            background: #e74c3c;
            color: white;
        }

        .badge-user {
            background: #3498db;
            color: white;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            color: white;
            padding: 25px;
            border-radius: 12px;
        }

        .stat-card h3 {
            font-size: 14px;
            color: #c0c0c0;
            margin-bottom: 10px;
        }

        .stat-card .value {
            font-size: 32px;
            font-weight: 700;
        }

        .permissions-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-top: 15px;
        }

        .permission-item {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .permission-item input[type="checkbox"] {
            width: 20px;
            height: 20px;
            cursor: pointer;
        }

        /* 교육과정 스타일 */
        .edu-level-tab.active {
            color: #ffffff !important;
            border-bottom-color: #667eea !important;
        }

        .courses-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 25px;
            margin-top: 20px;
        }

        .course-card {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 12px;
            padding: 25px;
            transition: all 0.3s;
            cursor: pointer;
        }

        .course-card:hover {
            transform: translateY(-5px);
            border-color: #667eea;
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
        }

        .course-card .course-header {
            display: flex;
            justify-content: space-between;
            align-items: start;
            margin-bottom: 15px;
        }

        .course-card .course-title {
            font-size: 18px;
            font-weight: 700;
            color: #ffffff;
            margin-bottom: 8px;
        }

        .course-card .course-meta {
            display: flex;
            gap: 15px;
            margin-top: 15px;
            font-size: 13px;
            color: #c0c0c0;
        }

        .course-card .course-meta-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .course-badge {
            display: inline-block;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            margin-bottom: 10px;
        }

        .badge-beginner {
            background: rgba(52, 152, 219, 0.2);
            color: #3498db;
            border: 1px solid #3498db;
        }

        .badge-intermediate {
            background: rgba(241, 196, 15, 0.2);
            color: #f1c40f;
            border: 1px solid #f1c40f;
        }

        .badge-advanced {
            background: rgba(231, 76, 60, 0.2);
            color: #e74c3c;
            border: 1px solid #e74c3c;
        }

        .badge-enrolled {
            background: rgba(102, 126, 234, 0.2);
            color: #667eea;
            border: 1px solid #667eea;
        }

        .badge-completed {
            background: rgba(39, 174, 96, 0.2);
            color: #27ae60;
            border: 1px solid #27ae60;
        }

        .course-description {
            color: #ccc;
            line-height: 1.6;
            margin-bottom: 15px;
        }

        .course-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }

        .recommended-for {
            font-size: 12px;
            color: #c0c0c0;
        }

        .recommended-for strong {
            color: #667eea;
        }

        /* 닉네임 모달 스타일 */
        .nickname-option {
            padding: 20px;
            background: rgba(255,255,255,0.05);
            border: 2px solid rgba(255,255,255,0.1);
            border-radius: 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: all 0.3s;
        }

        .nickname-option:hover {
            border-color: #667eea;
            background: rgba(102, 126, 234, 0.1);
        }

        .nickname-text {
            font-size: 18px;
            font-weight: 600;
            color: #ffffff;
        }

        /* 드롭다운 메뉴 스타일 */
        .user-menu {
            position: relative;
            display: inline-block;
        }

        .user-menu-toggle {
            background: rgba(255,255,255,0.1);
            border: 2px solid rgba(255,255,255,0.3);
            color: white;
            padding: 8px 16px;
            border-radius: 20px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s;
        }

        .user-menu-toggle:hover {
            background: rgba(255,255,255,0.2);
            border-color: rgba(255,255,255,0.5);
        }

        .user-menu-dropdown {
            display: none;
            position: absolute;
            top: 100%;
            right: 0;
            margin-top: 10px;
            background: rgba(20, 20, 20, 0.98);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 12px;
            min-width: 200px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.5);
            z-index: 1000;
            padding: 8px 0;
        }

        .user-menu-dropdown.active {
            display: block;
        }

        .user-menu-item {
            padding: 12px 20px;
            color: white;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            transition: all 0.3s;
            border: none;
            background: transparent;
            width: 100%;
            text-align: left;
            font-size: 14px;
        }

        .user-menu-item:hover {
            background: rgba(102, 126, 234, 0.2);
        }

        .user-menu-badge {
            display: block;
            text-align: center;
            font-size: 11px;
            color: #c0c0c0;
            margin-top: 4px;
        }

        /* ==================== 알림센터 ==================== */
        .notification-bell {
            position: relative;
            display: inline-block;
        }

        .notification-bell-btn {
            background: rgba(255,255,255,0.1);
            border: 2px solid rgba(255,255,255,0.3);
            color: white;
            padding: 8px 14px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 16px;
            transition: all 0.3s;
            position: relative;
        }

        .notification-bell-btn:hover {
            background: rgba(255,255,255,0.2);
            border-color: rgba(255,255,255,0.5);
        }

        .notification-bell.has-unread .notification-bell-btn {
            border-color: rgba(239, 68, 68, 0.5);
            animation: bell-glow 2s ease-in-out infinite;
        }

        @keyframes bell-glow {
            0%, 100% { border-color: rgba(239, 68, 68, 0.5); box-shadow: none; }
            50% { border-color: rgba(239, 68, 68, 0.8); box-shadow: 0 0 12px rgba(239, 68, 68, 0.3); }
        }

        .notification-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            background: #ef4444;
            color: #fff;
            font-size: 10px;
            font-weight: 700;
            min-width: 18px;
            height: 18px;
            border-radius: 9px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 4px;
            line-height: 1;
            animation: notif-pulse 1.5s ease-in-out infinite;
            box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
        }

        @keyframes notif-pulse {
            0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px rgba(239, 68, 68, 0.6); }
            50% { opacity: 0.7; transform: scale(1.15); box-shadow: 0 0 16px rgba(239, 68, 68, 0.9); }
        }

        .notification-dropdown {
            display: none;
            position: absolute;
            top: 100%;
            right: 0;
            margin-top: 10px;
            background: rgba(20, 20, 20, 0.98);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 12px;
            width: 340px;
            max-height: 460px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.5);
            z-index: 1001;
            overflow: hidden;
        }

        .notification-dropdown.active {
            display: flex;
            flex-direction: column;
        }

        .notif-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 14px 16px 10px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }

        .notif-header span {
            color: #fff;
            font-weight: 600;
            font-size: 15px;
        }

        .notif-header button {
            background: none;
            border: none;
            color: #6366f1;
            cursor: pointer;
            font-size: 12px;
            padding: 4px 8px;
            border-radius: 6px;
        }

        .notif-header button:hover {
            background: rgba(99,102,241,0.15);
        }

        .notif-list {
            overflow-y: auto;
            flex: 1;
            max-height: 360px;
        }

        .notif-item {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 12px 16px;
            cursor: pointer;
            transition: background 0.2s;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }

        .notif-item:hover {
            background: rgba(99,102,241,0.1);
        }

        .notif-item.unread {
            background: rgba(99,102,241,0.06);
        }

        .notif-icon {
            font-size: 18px;
            flex-shrink: 0;
            margin-top: 2px;
        }

        .notif-body {
            flex: 1;
            min-width: 0;
        }

        .notif-message {
            color: #e0e0e0;
            font-size: 13px;
            line-height: 1.4;
            word-break: break-word;
        }

        .notif-time {
            color: #888;
            font-size: 11px;
            margin-top: 4px;
        }

        .notif-dot {
            width: 8px;
            height: 8px;
            background: #6366f1;
            border-radius: 50%;
            flex-shrink: 0;
            margin-top: 6px;
        }

        .notif-empty {
            text-align: center;
            padding: 40px 20px;
            color: #888;
            font-size: 13px;
        }

        .notif-footer {
            border-top: 1px solid rgba(255,255,255,0.1);
            padding: 10px;
            text-align: center;
        }

        .notif-footer button {
            background: none;
            border: none;
            color: #6366f1;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            padding: 6px 12px;
            border-radius: 6px;
        }

        .notif-footer button:hover {
            background: rgba(99,102,241,0.15);
        }

        /* ── 내 활동 모달 ── */
        .activity-tabs {
            display: flex;
            gap: 8px;
            margin-top: 10px;
        }

        .activity-tab {
            flex: 1;
            padding: 10px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            color: #c0c0c0;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            transition: all 0.2s;
        }

        .activity-tab:hover {
            background: rgba(99,102,241,0.1);
        }

        .activity-tab.active {
            background: rgba(99,102,241,0.2);
            border-color: #6366f1;
            color: #fff;
        }

        .my-activity-item {
            padding: 12px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            cursor: pointer;
            transition: background 0.2s;
            border-radius: 6px;
        }

        .my-activity-item:hover {
            background: rgba(99,102,241,0.08);
        }

        .my-activity-meta {
            display: flex;
            justify-content: space-between;
            margin-bottom: 4px;
        }

        .my-activity-category,
        .my-activity-author {
            font-size: 11px;
            color: #6366f1;
            font-weight: 500;
        }

        .my-activity-time {
            font-size: 11px;
            color: #888;
        }

        .my-activity-title {
            font-size: 13px;
            color: #e0e0e0;
            font-weight: 500;
            margin-bottom: 4px;
        }

        .my-activity-content {
            font-size: 12px;
            color: #999;
            line-height: 1.4;
        }

        /* ==================== 채팅 사이드 패널 ==================== */
        .chat-side-panel {
            position: fixed;
            top: 0;
            right: 0;
            height: calc(100vh - 28px); /* status-bar 높이 제외 */
            width: 0;
            background: rgba(15, 15, 20, 0.98);
            border-left: 1px solid rgba(255,255,255,0.1);
            z-index: 900;
            overflow: hidden;
            transition: width 0.25s ease;
            display: flex;
            flex-direction: column;
        }

        .chat-side-panel.open {
            width: 280px;
        }

        .chat-resize-handle {
            position: absolute;
            top: 0;
            left: 0;
            width: 8px;
            height: 100%;
            cursor: col-resize;
            background: rgba(255,255,255,0.03);
            z-index: 10;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .chat-resize-handle:hover {
            background: rgba(99,102,241,0.2);
        }

        .chat-resize-dots {
            color: rgba(255,255,255,0.3);
            font-size: 14px;
            letter-spacing: -2px;
            pointer-events: none;
        }

        .chat-resize-handle:hover .chat-resize-dots {
            color: rgba(99,102,241,0.8);
        }

        .chat-panel-inner {
            display: flex;
            flex-direction: column;
            height: 100%;
            min-width: 200px;
        }

        .chat-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 14px 16px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            font-size: 14px;
            font-weight: 600;
            color: #fff;
            flex-shrink: 0;
        }

        .chat-toggle-btn {
            background: none;
            border: none;
            color: #888;
            cursor: pointer;
            font-size: 16px;
            padding: 2px 6px;
            border-radius: 4px;
        }

        .chat-toggle-btn:hover {
            color: #fff;
            background: rgba(255,255,255,0.1);
        }

        .chat-open-btn {
            position: fixed;
            bottom: 44px; /* status-bar(28px) + 여백 */
            right: 16px;
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: linear-gradient(135deg, #6366f1, #4f46e5);
            border: none;
            color: #fff;
            font-size: 20px;
            cursor: pointer;
            box-shadow: 0 4px 16px rgba(99,102,241,0.4);
            z-index: 899;
            transition: transform 0.2s;
        }

        .chat-open-btn:hover {
            transform: scale(1.1);
        }

        .chat-side-panel.open ~ .chat-open-btn {
            display: none;
        }

        /* 접속자 목록 */
        .chat-online-list {
            padding: 10px 14px;
            border-bottom: 1px solid rgba(255,255,255,0.08);
            flex-shrink: 0;
            max-height: 160px;
            overflow-y: auto;
        }

        .chat-section-title {
            font-size: 11px;
            color: #888;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
        }

        .chat-online-count {
            background: #10b981;
            color: #fff;
            font-size: 10px;
            padding: 1px 6px;
            border-radius: 8px;
            margin-left: 4px;
        }

        .chat-online-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 3px 0;
            font-size: 12px;
            color: #d0d0d0;
        }

        .chat-online-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #10b981;
            flex-shrink: 0;
        }

        /* 메시지 목록 */
        .chat-message-list {
            flex: 1;
            overflow-y: auto;
            padding: 10px 14px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .chat-msg {
            max-width: 85%;
        }

        .chat-msg-mine {
            align-self: flex-end;
        }

        .chat-msg-name {
            font-size: 10px;
            color: #888;
            margin-bottom: 2px;
            padding-left: 2px;
        }

        .chat-msg-bubble {
            padding: 8px 12px;
            border-radius: 12px;
            font-size: 13px;
            line-height: 1.4;
            word-break: break-word;
            background: rgba(255,255,255,0.08);
            color: #e0e0e0;
        }

        .chat-msg-mine .chat-msg-bubble {
            background: rgba(99,102,241,0.25);
            color: #e8e8ff;
        }

        .chat-msg-time {
            font-size: 10px;
            color: #666;
            margin-top: 2px;
            padding-left: 2px;
        }

        .chat-msg-mine .chat-msg-time {
            text-align: right;
            padding-right: 2px;
        }

        /* 입력 영역 */
        .chat-input-area {
            display: flex;
            gap: 6px;
            padding: 10px 14px;
            border-top: 1px solid rgba(255,255,255,0.1);
            flex-shrink: 0;
        }

        .chat-input-area input {
            flex: 1;
            padding: 8px 12px;
            border: 1px solid rgba(255,255,255,0.15);
            border-radius: 8px;
            background: rgba(255,255,255,0.05);
            color: #f0f0f0;
            font-size: 13px;
            outline: none;
        }

        .chat-input-area input:focus {
            border-color: rgba(99,102,241,0.5);
        }

        .chat-send-btn {
            padding: 8px 14px;
            background: linear-gradient(135deg, #6366f1, #4f46e5);
            border: none;
            border-radius: 8px;
            color: #fff;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            flex-shrink: 0;
        }

        .chat-send-btn:hover {
            opacity: 0.9;
        }

        @media (max-width: 768px) {
            .chat-side-panel.open {
                width: 100% !important;
            }
        }

        /* ==================== 참여 현황 대시보드 ==================== */
        .participation-modal-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.85);
            z-index: 2000;
            overflow-y: auto;
        }
        .participation-modal-overlay.active { display: block; }
        .participation-modal {
            background: #111;
            border: 1px solid rgba(255,255,255,0.15);
            border-radius: 16px;
            max-width: 1200px;
            margin: 30px auto;
            padding: 30px;
            position: relative;
        }
        .participation-modal h2 {
            color: #fff;
            margin-bottom: 20px;
        }
        .pm-close-btn {
            position: absolute;
            top: 15px; right: 20px;
            background: none; border: none;
            color: #c0c0c0; font-size: 28px;
            cursor: pointer;
        }
        .pm-close-btn:hover { color: #fff; }
        .pm-controls {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            align-items: flex-end;
            margin-bottom: 20px;
            padding: 15px;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 12px;
        }
        .pm-control-group {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }
        .pm-control-group label {
            color: #c0c0c0;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .pm-control-group input[type="date"],
        .pm-control-group select,
        .pm-control-group input[type="number"] {
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.2);
            color: #fff;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 13px;
        }
        .pm-control-group input[type="number"] { width: 70px; }
        .pm-view-btns {
            display: flex;
            gap: 4px;
        }
        .pm-view-btn {
            padding: 8px 14px;
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.15);
            color: #ccc;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.2s;
        }
        .pm-view-btn.active,
        .pm-view-btn:hover {
            background: rgba(74,158,255,0.2);
            border-color: #4a9eff;
            color: #4a9eff;
        }
        .pm-metrics-group {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }
        .pm-metric-checkbox {
            display: flex;
            align-items: center;
            gap: 5px;
            color: #ccc;
            font-size: 13px;
            cursor: pointer;
        }
        .pm-metric-checkbox input { accent-color: #4a9eff; }
        .pm-toggle {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #ccc;
            font-size: 13px;
        }
        .pm-toggle-switch {
            position: relative;
            width: 44px;
            height: 24px;
            background: rgba(255,255,255,0.15);
            border-radius: 12px;
            cursor: pointer;
            transition: background 0.3s;
        }
        .pm-toggle-switch.active {
            background: rgba(74,158,255,0.5);
        }
        .pm-toggle-switch::after {
            content: '';
            position: absolute;
            width: 20px; height: 20px;
            background: #fff;
            border-radius: 50%;
            top: 2px; left: 2px;
            transition: transform 0.3s;
        }
        .pm-toggle-switch.active::after {
            transform: translateX(20px);
        }
        .pm-chart-wrapper {
            position: relative;
            overflow-x: auto;
            overflow-y: hidden;
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 12px;
            background: rgba(255,255,255,0.02);
            margin-bottom: 20px;
            padding: 15px;
        }
        .pm-chart-inner {
            min-height: 350px;
        }
        .pm-table-section {
            margin-top: 20px;
        }
        .pm-table-section h3 {
            color: #fff;
            margin-bottom: 10px;
        }
        .pm-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }
        .pm-table th {
            background: rgba(74,158,255,0.15);
            color: #4a9eff;
            padding: 10px 12px;
            text-align: left;
            cursor: pointer;
            white-space: nowrap;
            user-select: none;
            border-bottom: 2px solid rgba(74,158,255,0.3);
        }
        .pm-table th:hover { background: rgba(74,158,255,0.25); }
        .pm-table th .sort-arrow { margin-left: 5px; font-size: 10px; }
        .pm-table td {
            padding: 8px 12px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            color: #ccc;
        }
        .pm-table tr:hover td { background: rgba(255,255,255,0.03); }
        /* 캐시 데이터 현황 */
        .pm-storage-section {
            margin-top: 25px;
            padding: 20px;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 12px;
        }
        .pm-storage-section h3 { color: #fff; margin-bottom: 15px; }
        .pm-storage-bar-bg {
            width: 100%;
            height: 24px;
            background: rgba(255,255,255,0.08);
            border-radius: 12px;
            overflow: hidden;
            margin-bottom: 10px;
        }
        .pm-storage-bar-fill {
            height: 100%;
            border-radius: 12px;
            transition: width 0.5s;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 600;
            color: #fff;
        }
        .pm-storage-bar-fill.green { background: linear-gradient(90deg, #27ae60, #2ecc71); }
        .pm-storage-bar-fill.yellow { background: linear-gradient(90deg, #f39c12, #f1c40f); }
        .pm-storage-bar-fill.red { background: linear-gradient(90deg, #e74c3c, #c0392b); }
        .pm-storage-items {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-top: 12px;
        }
        .pm-storage-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 12px;
            background: rgba(255,255,255,0.04);
            border-radius: 8px;
            font-size: 12px;
        }
        .pm-storage-item-key { color: #4a9eff; font-family: monospace; }
        .pm-storage-item-size { color: #c0c0c0; }
        .pm-storage-warning {
            margin-top: 12px;
            padding: 10px 15px;
            border-radius: 8px;
            font-size: 13px;
        }
        .pm-storage-warning.safe {
            background: rgba(39,174,96,0.1);
            border: 1px solid rgba(39,174,96,0.3);
            color: #2ecc71;
        }
        .pm-storage-warning.caution {
            background: rgba(243,156,18,0.1);
            border: 1px solid rgba(243,156,18,0.3);
            color: #f39c12;
        }
        .pm-storage-warning.danger {
            background: rgba(231,76,60,0.1);
            border: 1px solid rgba(231,76,60,0.3);
            color: #e74c3c;
        }

        /* Activity Log Feed */
        .activity-feed-section {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-top: 20px;
            padding: 0 20px;
        }
        .activity-log-item {
            padding: 10px 12px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            font-size: 13px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .activity-log-item:last-child { border-bottom: none; }
        .activity-log-nickname { color: #4a9eff; font-weight: 600; white-space: nowrap; }
        .activity-log-board { color: #c0c0c0; font-size: 12px; white-space: nowrap; }
        .activity-log-title { color: #ccc; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .activity-log-points { color: #27ae60; font-weight: 600; white-space: nowrap; }
        .activity-log-time { color: #b0b0b0; font-size: 12px; white-space: nowrap; }

        /* Status Bar */
        .status-bar {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 28px;
            background: linear-gradient(90deg, rgba(255, 166, 0, 0.15) 0%, rgba(255, 140, 0, 0.15) 100%);
            border-top: 1px solid rgba(255, 166, 0, 0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            font-size: 12px;
            color: rgba(255, 200, 100, 0.9);
            font-weight: 500;
            letter-spacing: 0.5px;
            backdrop-filter: blur(10px);
        }

        .status-bar-icon {
            margin-right: 8px;
            animation: pulse 2s ease-in-out infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 0.6; }
            50% { opacity: 1; }
        }

        .status-bar-text {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .status-divider {
            color: rgba(255, 166, 0, 0.3);
        }

        /* =============================================
           반응형 디자인 — 태블릿 (≤768px)
           ============================================= */
        @media (max-width: 768px) {
            .activity-feed-section {
                grid-template-columns: 1fr;
            }

            #loginWrapper {
                flex-direction: column !important;
                align-items: center !important;
                position: relative !important;
                top: auto !important;
                left: auto !important;
                transform: none !important;
                padding: 20px 16px !important;
                margin-top: 40px !important;
            }
            #loginWrapper #externalNoticeBox {
                order: 2 !important;
                max-width: 100% !important;
            }
            .login-container {
                padding: 30px 24px;
                max-width: 100%;
                margin: 0;
            }

            .dashboard-header {
                padding: 14px 20px;
                flex-wrap: wrap;
                gap: 10px;
            }

            .dashboard-nav {
                padding: 0 16px;
            }

            .nav-tabs {
                overflow-x: auto;
                flex-wrap: nowrap;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
            }

            .nav-tabs::-webkit-scrollbar {
                display: none;
            }

            .nav-tab {
                padding: 12px 16px;
                font-size: 13px;
                white-space: nowrap;
            }

            .dashboard-content {
                padding: 20px 16px;
            }

            /* stats-grid: 4개 항목 → 2×2 */
            .stats-grid {
                grid-template-columns: repeat(2, 1fr) !important;
            }

            /* 교육과정 학습현황 stats-grid도 동일 적용 */
            .admin-section .stats-grid {
                grid-template-columns: repeat(2, 1fr) !important;
            }

            /* 코스 카드 그리드 */
            .courses-grid {
                grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            }

            /* 교육과정 레벨 탭 스크롤 */
            .education-level-tabs {
                overflow-x: auto;
                flex-wrap: nowrap !important;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
                padding-bottom: 4px;
            }

            .education-level-tabs::-webkit-scrollbar {
                display: none;
            }

            .education-level-tabs button {
                white-space: nowrap;
                padding: 12px 20px !important;
                font-size: 14px !important;
            }

            /* 사용자 목록 아이템 */
            .user-item {
                flex-wrap: wrap;
                gap: 10px;
            }

            .user-item-actions {
                flex-wrap: wrap;
            }

            /* 모달 */
            .modal-content {
                padding: 24px 20px;
                width: 95%;
            }

            /* 권한 그리드 */
            .permissions-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        /* =============================================
           반응형 디자인 — 모바일 (≤480px)
           ============================================= */
        @media (max-width: 480px) {
            .notification-dropdown {
                width: 290px;
                right: -40px;
            }

            .login-container {
                padding: 24px 16px;
                margin: 16px;
                margin-top: 24px;
            }

            .logo h1 {
                font-size: 22px;
            }

            .dashboard-header {
                padding: 12px 14px;
            }

            .user-info {
                gap: 8px;
            }

            .user-avatar {
                width: 36px;
                height: 36px;
            }

            .nav-tab {
                padding: 10px 12px;
                font-size: 12px;
            }

            .dashboard-content {
                padding: 16px 12px;
            }

            /* stats-grid: 4개 항목 → 4×1 (1열) */
            .stats-grid {
                grid-template-columns: repeat(1, 1fr) !important;
            }

            .admin-section .stats-grid {
                grid-template-columns: repeat(1, 1fr) !important;
            }

            /* 코스 카드 1열 */
            .courses-grid {
                grid-template-columns: 1fr;
            }

            .stat-card .value {
                font-size: 26px;
            }

            /* 사용자 목록: 세로 배치 */
            .user-item {
                flex-direction: column;
                align-items: flex-start;
            }

            .user-item-actions {
                width: 100%;
                justify-content: flex-start;
            }

            /* 버튼 */
            .btn-small {
                font-size: 12px;
                padding: 5px 10px;
            }

            /* 모달 */
            .modal-content {
                padding: 20px 14px;
                width: 98%;
            }
        }

        /* =============================================
           반응형 디자인 — 스마트폰 (≤767px) [wth]
           ============================================= */
        @media (max-width: 767px) {
            /* --- 로그인 --- */
            .login-container {
                padding: 24px 16px;
                max-width: 100%;
                margin: 16px;
                position: relative;
                top: auto; left: auto;
                transform: none;
            }
            .logo h1 { font-size: 20px; }

            /* --- 헤더 --- */
            .dashboard-header {
                padding: 10px 12px;
                gap: 8px;
            }
            .dashboard-header h2 { font-size: 14px; }
            .user-info { gap: 8px; }
            .user-avatar { width: 32px; height: 32px; }
            .user-info .user-name { font-size: 12px; }
            .logout-btn {
                padding: 5px 12px;
                font-size: 12px;
                margin-left: 8px;
            }

            /* --- 탭 네비 --- */
            .dashboard-nav { padding: 0 8px; }
            .nav-tabs {
                overflow-x: auto;
                flex-wrap: nowrap;
                -webkit-overflow-scrolling: touch;
                gap: 2px;
            }
            .nav-tab {
                padding: 10px 12px;
                font-size: 12px;
                white-space: nowrap;
                min-height: 44px;
            }

            /* --- 메인 콘텐츠 --- */
            .dashboard-content { padding: 12px 8px; }
            .content-frame { min-height: 300px; }

            /* --- 채팅 패널 모바일 풀스크린 --- */
            .chat-side-panel.open {
                width: 100% !important;
                max-width: 100vw;
            }
            .chat-open-btn {
                width: 44px;
                height: 44px;
                bottom: 36px;
                right: 8px;
                font-size: 18px;
            }
            .chat-resize-handle { display: none; }

            /* --- 통계 그리드 --- */
            .stats-grid { grid-template-columns: 1fr !important; }
            .admin-section .stats-grid { grid-template-columns: 1fr !important; }

            /* --- 코스 카드 --- */
            .courses-grid { grid-template-columns: 1fr; }

            /* --- 활동 피드 --- */
            .activity-feed-section { grid-template-columns: 1fr; }

            /* --- 모달 풀스크린 --- */
            .modal-content {
                width: 98vw !important;
                max-width: none !important;
                max-height: 92vh;
                padding: 16px 12px;
                border-radius: 12px;
            }

            /* --- 관리자 패널 --- */
            .admin-section { padding: 16px 12px; }
            .admin-section h3 { font-size: 16px; }
            .permissions-grid { grid-template-columns: 1fr; }

            /* --- 교육과정 레벨 탭 --- */
            .education-level-tabs {
                overflow-x: auto;
                flex-wrap: nowrap !important;
                -webkit-overflow-scrolling: touch;
            }
            .education-level-tabs button {
                white-space: nowrap;
                padding: 10px 14px !important;
                font-size: 12px !important;
                min-height: 44px;
            }

            /* --- 사용자 목록 --- */
            .user-item {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }
            .user-item-actions {
                width: 100%;
                flex-wrap: wrap;
            }

            /* --- 알림 --- */
            .notification-dropdown {
                width: 280px;
                right: -20px;
            }

            /* --- 터치 친화 버튼 --- */
            button, .btn, .btn-small {
                min-height: 40px;
            }

            /* --- 상태바 --- */
            .status-bar { font-size: 11px; padding: 4px 8px; }

            /* --- 참여현황 모달 --- */
            .participation-modal {
                margin: 10px;
                padding: 16px;
            }
            .pm-controls {
                flex-direction: column;
                gap: 10px;
                padding: 10px;
            }
        }