/* 두아온 지통실 - 다크모드 + UI 개선 버전 */
@font-face {
    font-family: 'CookieRun-Regular';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/CookieRun-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

:root {
    /* 라이트 모드 색상 */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f4;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-tertiary: #495057;
    --border-color: #e9ecef;
    --border-light: #dee2e6;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --accent-primary: #495057;
    --accent-secondary: #6c757d;
    --title-gradient-start: #2c3e50;
    --title-gradient-end: #495057;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --error-color: #dc3545;
    --info-color: #17a2b8;
}

[data-theme="dark"] {
    /* 다크 모드 색상 */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3d3d3d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-tertiary: #d0d0d0;
    --border-color: #444444;
    --border-light: #555555;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.5);
    --accent-primary: #ffffff;
    --accent-secondary: #e0e0e0;
    --title-gradient-start: #ffffff;
    --title-gradient-end: #e0e0e0;
    --success-color: #4ade80;
    --warning-color: #fbbf24;
    --error-color: #f87171;
    --info-color: #38bdf8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'CookieRun-Regular', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== 다크모드 토글 버튼 ===== */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--shadow-light);
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--shadow-medium);
}

.theme-toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-toggle-icon {
    transform: rotate(360deg);
}

/* ===== 헤더 스타일 ===== */
header {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

header:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--shadow-medium);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 35px;
    justify-content: space-between; 
}

.header-gif {
    width: 220px;
    height: 130px;
    border-radius: 15px;
    box-shadow: 0 6px 25px var(--shadow-medium);
    object-fit: cover;
    transition: transform 0.3s ease;
}

.header-gif:hover {
    transform: scale(1.05);
}

.header-info {
    flex: 1;
}

.main-title {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--title-gradient-start), var(--title-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px var(--shadow-light);
}

.live-stats {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 600;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.stats-info {
    display: flex;
    gap: 25px;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.last-update {
    font-size: 0.95rem;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== 통합 컨트롤 패널 ===== */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 4px 20px var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.controls:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px var(--shadow-medium);
}

.guild-section {
    display: flex;
    align-items: center;
    gap: 0px; /* 길드 필터 라벨 제거로 gap 조정 */
    flex-wrap: wrap;
    flex: 1;
}

.guild-label {
    display: none; /* 길드 필터 텍스트 숨기기 */
    font-weight: 700;
    color: var(--text-tertiary);
    font-size: 1rem;
    white-space: nowrap;
}

.guild-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.guild-filter-btn {
    padding: 10px 18px;
    border: 2px solid var(--border-light);
    border-radius: 25px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.guild-filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.guild-filter-btn:hover::before {
    left: 100%;
}

.guild-filter-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-light);
}

.guild-filter-btn.active {
    background: var(--text-primary);
    color: var(--bg-secondary);
    border-color: var(--text-primary);
    box-shadow: 0 4px 15px var(--shadow-light);
    transform: translateY(-2px);
}

.control-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.refresh-btn {
    padding: 12px 24px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.refresh-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.refresh-btn:hover::before {
    left: 100%;
}

.refresh-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-light);
}

.refresh-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.refresh-interval {
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-secondary);
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.refresh-interval:focus {
    outline: none;
    border-color: var(--text-secondary);
    box-shadow: 0 0 0 3px var(--shadow-light);
}

.refresh-control-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.refresh-label {
    font-size: 0.95rem;
    color: var(--text-tertiary);
    font-weight: 700;
    white-space: nowrap;
}

/* ===== 로딩 및 진행률 표시 ===== */
.loading {
    text-align: center;
    padding: 100px 20px;
    color: var(--text-secondary);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.loading p {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.spinner {
    width: 70px;
    height: 70px;
    border: 6px solid var(--bg-tertiary);
    border-top: 6px solid var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

.progress-container {
    margin-top: 25px;
    width: 100%;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--text-primary), var(--text-secondary));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 5px;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== 스트리머 그리드 ===== */
.streamer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4개씩 고정 */
    gap: 30px;
    margin-top: 35px;
}

/* ===== 스트리머 카드 ===== */
.streamer-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px var(--shadow-light);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: relative;
}

.streamer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(102, 126, 234, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.streamer-card:hover::before {
    opacity: 1;
}

.streamer-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px var(--shadow-medium);
}

.streamer-card.live {
    border-left: 5px solid var(--success-color);
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.2);
}

.streamer-card.offline {
    border-left: 5px solid var(--text-secondary);
}

.streamer-card.error {
    border-left: 5px solid var(--error-color);
    background-color: rgba(220, 53, 69, 0.05);
}

.streamer-card.error:hover {
    transform: none;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.2);
    cursor: default;
}

.streamer-card.suspended {
    border-left: 5px solid var(--warning-color);
    background-color: rgba(255, 193, 7, 0.05);
}

/* ===== 썸네일 컨테이너 ===== */
.thumbnail-container {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.streamer-card:hover .thumbnail {
    transform: scale(1.1);
}

/* ===== 라이브 인디케이터 ===== */
.live-indicator {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
    animation: pulse 2s infinite;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.error-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(220, 53, 69, 0.95);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

/* ===== 카드 정보 섹션 ===== */
.card-info {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.streamer-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.stream-title {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    min-height: 3em;
    font-weight: 500;
}

.card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.error-message {
    color: var(--error-color);
    font-size: 0.95rem;
    text-align: center;
    padding: 12px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 10px;
    margin: 10px 0;
    font-weight: 600;
}

/* ===== 스켈레톤 애니메이션 ===== */
.streamer-card.skeleton {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    pointer-events: none;
}

.skeleton-thumbnail {
    width: 100%;
    height: 220px;
    background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-tertiary) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 20px 20px 0 0;
}

.skeleton-status {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 80px;
    height: 25px;
    background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-tertiary) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 15px;
}

.skeleton-name {
    height: 24px;
    width: 75%;
    background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-tertiary) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 6px;
    margin: 12px 0;
}

.skeleton-title {
    height: 18px;
    width: 90%;
    background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-tertiary) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin: 10px 0;
}

/* ===== 에러 스타일 ===== */
.error {
    text-align: center;
    padding: 60px 20px;
    color: var(--error-color);
    background: var(--bg-secondary);
    border-radius: 20px;
    box-shadow: 0 4px 20px var(--shadow-light);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* ===== 푸터 ===== */
footer {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    color: var(--text-secondary);
    margin-top: 50px;
    box-shadow: 0 4px 20px var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

footer:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--shadow-medium);
}

footer p {
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 600;
}

/* ===== 플로팅 채팅 스타일 ===== */
.floating-chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    user-select: none;
}

.floating-chat-button:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 35px rgba(102, 126, 234, 0.6);
}

.floating-chat-button.active {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
}

.floating-chat-button.has-notification {
    animation: bounce 0.6s ease-in-out infinite alternate;
}

.chat-icon {
    font-size: 28px;
    color: white;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--error-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    border: 3px solid white;
    animation: pulse 2s infinite;
}

/* ===== 플로팅 채팅 윈도우 ===== */
.floating-chat-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    height: 520px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 15px 50px var(--shadow-medium);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 999;
    animation: slideInUp 0.4s ease-out;
}

.floating-chat-window.hidden {
    display: none;
}

.floating-chat-window .chat-header {
    background: var(--text-primary);
    color: var(--bg-secondary);
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.floating-chat-window .chat-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.chat-header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.floating-chat-window .chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.floating-chat-window .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: pulse 2s infinite;
}

.floating-chat-window .status-dot.status-connected {
    background: var(--success-color);
}

.floating-chat-window .status-dot.status-disconnected {
    background: var(--error-color);
}

.floating-chat-window .status-dot.status-reconnecting {
    background: var(--warning-color);
}

.floating-chat-window .status-dot.status-error {
    background: var(--error-color);
}

.close-button {
    background: none;
    border: none;
    color: var(--bg-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.floating-chat-window .chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) var(--bg-primary);
}

.floating-chat-window .chat-messages::-webkit-scrollbar {
    width: 6px;
}

.floating-chat-window .chat-messages::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.floating-chat-window .chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

.floating-chat-window .chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.floating-chat-window .loading-messages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    height: 100%;
    font-weight: 600;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.floating-chat-window .spinner-small {
    width: 20px;
    height: 20px;
    border: 3px solid var(--bg-tertiary);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.floating-chat-window .no-messages {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 25px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.floating-chat-window .chat-message {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    line-height: 1.5;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: fadeInUp 0.4s ease;
    transition: all 0.3s ease;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.floating-chat-window .chat-message:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--shadow-light);
}

.floating-chat-window .message-time {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 0.8rem;
    white-space: pre-line;
    flex-shrink: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    text-align: center;
    line-height: 1.3;
}

.floating-chat-window .message-content {
    color: var(--text-primary);
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-weight: 500;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.floating-chat-window .chat-error {
.floating-chat-window .chat-error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 0.85rem;
    border: 1px solid rgba(220, 53, 69, 0.2);
    animation: fadeInUp 0.4s ease;
    font-weight: 600;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
}

.floating-chat-window .chat-input-container {
    padding: 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.floating-chat-window #floatingMessageInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: 20px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 500;
}

.floating-chat-window #floatingMessageInput:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.floating-chat-window #floatingMessageInput::placeholder {
    color: var(--text-secondary);
}

.floating-chat-window #floatingSendButton {
    padding: 12px 18px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.floating-chat-window #floatingSendButton:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.floating-chat-window #floatingSendButton:disabled {
    background: var(--text-secondary);
    color: var(--bg-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

footer a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* ===== 애니메이션 ===== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

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

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* ===== 유틸리티 클래스 ===== */
.hidden {
    display: none;
}

/* ===== 접근성 개선 ===== */
.streamer-card:focus,
.refresh-btn:focus,
.guild-filter-btn:focus,
.theme-toggle:focus {
    outline: 3px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ===== 반응형 디자인 ===== */
@media (max-width: 1400px) {
    .streamer-grid {
        grid-template-columns: repeat(3, 1fr); /* 3개씩 */
    }
}

@media (max-width: 1024px) {
    .streamer-grid {
        grid-template-columns: repeat(2, 1fr); /* 2개씩 */
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .theme-toggle {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .header-gif {
        width: 180px;
        height: 110px;
    }
    
    .main-title {
        font-size: 2.2rem;
    }
    
    .controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .guild-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .guild-buttons {
        justify-content: center;
    }
    
    .control-right {
        width: 100%;
        justify-content: center;
    }
    
    .streamer-grid {
        grid-template-columns: 1fr; /* 1개씩 */
        gap: 20px;
    }
    
    .floating-chat-window {
        width: 320px;
        height: 450px;
        bottom: 90px;
        right: 15px;
    }
    
    .floating-chat-button {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
    }
    
    .chat-icon {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header-content {
        padding: 20px;
    }
    
    .header-gif {
        width: 150px;
        height: 90px;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .live-stats {
        font-size: 1.1rem;
    }
    
    .stats-info {
        flex-direction: column;
        gap: 10px;
        font-size: 0.9rem;
    }
    
    .guild-filter-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .streamer-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .floating-chat-window {
        width: 280px;
        height: 400px;
        bottom: 80px;
        right: 10px;
    }
    
    .floating-chat-button {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
    
    .chat-icon {
        font-size: 20px;
    }
}

/* ===== 고대비 모드 지원 ===== */
@media (prefers-contrast: high) {
    :root {
        --shadow-light: rgba(0, 0, 0, 0.2);
        --shadow-medium: rgba(0, 0, 0, 0.4);
    }
    
    [data-theme="dark"] {
        --shadow-light: rgba(0, 0, 0, 0.6);
        --shadow-medium: rgba(0, 0, 0, 0.8);
    }
    
    .streamer-card {
        border-width: 2px;
    }
    
    .guild-filter-btn {
        border-width: 2px;
    }
}

/* ===== 모션 감소 모드 지원 ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .streamer-card:hover {
        transform: none;
    }
    
    .floating-chat-button:hover {
        transform: none;
    }
    
    .refresh-btn:hover {
        transform: none;
    }
    
    .guild-filter-btn:hover {
        transform: none;
    }
    
    .theme-toggle:hover {
        transform: none;
    }
}

/* ===== 헤더 우측 제작자 섹션 ===== */
.header-right {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
    min-width: 200px;
}

/* 위키 버튼 디자인 변경 - 기존 디자인과 맞춤 */
.wiki-button {
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-light);
    cursor: pointer;
}

.wiki-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--shadow-medium);
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
}
/* 제작자 섹션 */
.creators-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.creator-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.creator-profile, .creator-profile-fallback {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    background: var(--bg-tertiary);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.creator-profile {
    object-fit: cover;
}

.creator-profile-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-primary);
    font-size: 0.9rem;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
}

.creator-profile:hover, .creator-profile-fallback:hover {
    transform: scale(1.1);
    border-color: #4f46e5;
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.creator-button {
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.creator-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--shadow-medium);
    background: var(--bg-tertiary);
    border-color: #4f46e5;
}

/* 반응형 디자인 업데이트 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 25px;
    }

    .header-right {
        width: 100%;
        align-items: center;
    }

    .creators-section {
        align-items: center;
        flex-direction: row;
        gap: 15px;
    }

    .creator-item {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

