:root {
    --accent-color: #ffca28;
    --bg-dark: #121212;
}

body { 
    background-color: var(--bg-dark); 
    color: #ffffff; 
    font-family: 'Malgun Gothic', sans-serif; 
    padding: 30px; 
    margin: 0;
    padding-bottom: 140px;
}
.header-container {
    border-bottom: 2px solid #333333;
    padding-bottom: 20px;
    margin-bottom: 30px;
}
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}
h1 { 
    font-size: 2.2rem; 
    font-weight: bold; 
    margin: 0;
    color: var(--accent-color);
}

/* 라이브 알림 배너 스타일 */
.live-banner {
    display: none;
    background: linear-gradient(90deg, #b91c1c, #dc2626);
    border: 1px solid #ef4444;
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.5);
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    animation: pulse-live 2s infinite alternate;
}
@keyframes pulse-live {
    from { box-shadow: 0 0 10px rgba(220, 38, 38, 0.4); }
    to { box-shadow: 0 0 22px rgba(239, 68, 68, 0.8); }
}
.live-banner-text {
    font-size: 1.05rem;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 0.5px;
}
.btn-live-link {
    display: inline-block;
    background-color: #ffffff;
    color: #dc2626;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.btn-live-link:hover {
    background-color: #ffedd5;
    transform: scale(1.03);
}

/* 언어 선택 스위처 버튼 스타일 */
.lang-switcher {
    display: flex;
    background-color: #1a1a1a;
    border: 1px solid #444444;
    border-radius: 20px;
    padding: 3px;
    gap: 2px;
}
.btn-lang {
    background: transparent;
    color: #888888;
    border: none;
    padding: 6px 14px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.2s ease;
}
.btn-lang.active {
    background-color: var(--accent-color);
    color: #121212;
}

.app-desc { 
    font-size: 1.05rem;
    color: #dddddd; 
    line-height: 1.6;
    margin-bottom: 20px;
    background-color: #1e1e1e;
    padding: 18px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}
.app-desc-title {
    font-size: 1.15rem;
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 6px;
}

/* 음원 플랫폼 소제목 및 바로가기 버튼 스타일 */
.music-section-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-top: 18px;
    margin-bottom: 8px;
    border-top: 1px solid #333333;
    padding-top: 12px;
}
.music-platform-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.btn-platform {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
    text-decoration: none;
    color: #ffffff;
    background-color: #2a2a2a;
    border: 1px solid #444444;
    transition: all 0.2s ease;
}
.btn-platform:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.btn-platform.youtube:hover { background-color: #ff0000; border-color: #ff0000; }
.btn-platform.ytmusic:hover { background-color: #cc0000; border-color: #cc0000; }
.btn-platform.spotify:hover { background-color: #1db954; border-color: #1db954; }
.btn-platform.applemusic:hover { background-color: #fa243c; border-color: #fa243c; }

#auth-status { 
    font-size: 1.1rem; 
    font-weight: bold; 
    color: #4caf50; 
    margin-bottom: 20px;
    display: inline-block;
    vertical-align: middle;
}

.button-group {
    display: inline-block;
    vertical-align: middle;
}

.btn-user-settings {
    display: inline-block;
    background-color: var(--accent-color);
    color: #121212;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    vertical-align: middle;
    transition: all 0.2s;
    margin-right: 10px;
}
.btn-user-settings:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
}

.btn-login { 
    display: inline-block;
    background-color: #db4437; 
    color: #ffffff; 
    padding: 14px 28px; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    font-size: 1.1rem; 
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.btn-login:hover {
    background-color: #c53727;
}
.btn-logout {
    display: inline-block;
    background-color: #333333;
    color: #ffffff;
    padding: 14px 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem; 
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.2s;
    margin-left: 10px;
}
.btn-logout:hover {
    background-color: #555555;
}
.btn-settings {
    display: none;
    background-color: var(--accent-color);
    color: #121212;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    vertical-align: middle;
    transition: background-color 0.2s;
}
.btn-settings:hover {
    filter: brightness(1.1);
}

/* 수집률 프로그레스 바 스타일 */
.progress-container {
    max-width: 600px;
    margin: 15px auto 20px auto;
    background: rgba(0, 0, 0, 0.5);
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--accent-color);
}
.progress-bar-bg {
    width: 100%;
    height: 12px;
    background: #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color) 0%, #ffffff 100%);
    transition: width 0.8s ease-in-out;
}

/* 유저 환경설정 모달 스타일 */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex; justify-content: center; align-items: center;
    z-index: 20000;
}
.modal-card {
    background: #1e1e2d;
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    width: 90%; max-width: 480px;
    padding: 24px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    box-sizing: border-box;
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid #333338; padding-bottom: 12px; margin-bottom: 18px;
}
.modal-header h2 { margin: 0; font-size: 1.3rem; color: var(--accent-color); }
.btn-close { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }

/* 소개글 경고 안내 박스 */
.bio-warning-box {
    margin-top: 8px;
    padding: 10px 12px;
    background-color: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 6px;
    color: #fca5a5;
    font-size: 0.8rem;
    line-height: 1.45;
}

/* 색상 피커 및 커스텀 팔레트 슬롯 */
.color-picker-group { 
    display: flex; 
    gap: 12px; 
    align-items: center;
    margin-top: 6px; 
}
.btn-color { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; cursor: pointer; transition: transform 0.2s; }
.btn-color:hover { transform: scale(1.15); }
.color-gold { background: #ffca28; }
.color-blue { background: #00d2ff; }
.color-pink { background: #ff007f; }
.color-dark { background: #a855f7; }

.custom-color-picker-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px dashed var(--accent-color);
    position: relative;
    cursor: pointer;
    background: #2a2a2a;
}
.custom-color-picker-wrapper input[type="color"] {
    position: absolute;
    top: -8px; left: -8px;
    width: 48px; height: 48px;
    border: none;
    cursor: pointer;
    background: none;
}

.custom-slots-title {
    font-size: 0.8rem;
    color: #aaaaaa;
    margin-top: 12px;
    margin-bottom: 6px;
}
.custom-slots-group {
    display: flex;
    gap: 10px;
}
.btn-custom-slot {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #555555;
    background-color: #252525;
    color: #888888;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.btn-custom-slot:hover {
    transform: scale(1.1);
    border-color: #ffffff;
}
.btn-custom-slot.has-color {
    border: 2px solid #ffffff;
}
/* 커스텀 팔레트 하단 가이드 문구 */
.custom-slots-guide {
    margin-top: 8px;
    padding: 8px 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 0.78rem;
    color: #aaaaaa;
    line-height: 1.5;
}
.toggle-group {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-top: 1px solid #2a2a38; margin-top: 10px;
}
.toggle-group label { font-size: 0.95rem; color: #dddddd; font-weight: bold; }
.toggle-switch { width: 20px; height: 20px; cursor: pointer; }

.modal-footer { display: flex; gap: 10px; margin-top: 20px; }
.btn-save { flex: 2; padding: 12px; background: var(--accent-color); color: #121212; border: none; font-weight: bold; border-radius: 6px; cursor: pointer; font-size: 1rem; }
.btn-cancel { flex: 1; padding: 12px; background: #444444; color: #ffffff; border: none; border-radius: 6px; cursor: pointer; font-size: 1rem; }

.admin-panel {
    display: none;
    background-color: #1a1a1a;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}
.admin-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333333;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.admin-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.admin-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-top: 0;
    margin-bottom: 15px;
}
.form-group {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 10px;
}
.form-group label {
    display: block;
    font-size: 0.9rem;
    color: #aaaaaa;
    margin-bottom: 5px;
}
.form-control {
    background-color: #2b2b2b;
    border: 1px solid #444444;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 1rem;
}
.btn-admin-action {
    background-color: var(--accent-color);
    color: #121212;
    border: none;
    padding: 9px 18px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    min-width: 500px;
}
.admin-table th, .admin-table td {
    border: 1px solid #333333;
    padding: 10px;
    text-align: left;
}
.admin-table th {
    background-color: #222222;
    color: var(--accent-color);
}
.btn-delete-coupon {
    background-color: #db4437;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
}

.player-handle {
    font-size: 1rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 6px;
}
.coupon-badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.coupon-badge {
    background-color: #2a2a2a;
    color: #cccccc;
    border: 1px solid #444444;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: normal;
    white-space: nowrap;
}
.coupon-badge-none {
    color: #666666;
    font-size: 0.8rem;
    font-style: italic;
}

#current-theme-title {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333333;
    color: var(--accent-color);
    width: 100%;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin: 0 0 40px 0;
    width: 100%;
}
.card-item {
    position: relative;
    background-color: #1e1e1e;
    border-radius: 8px;
    border: 2px solid #333333;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    aspect-ratio: 16 / 9;
}
.card-item:hover {
    transform: scale(1.03);
    border-color: var(--accent-color);
}
.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s, opacity 0.3s;
    -webkit-user-drag: none;
    user-select: none;
}
.card-item.grayscale .card-img {
    filter: grayscale(100%);
    opacity: 0.3;
}
.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-name {
    font-size: 0.95rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}
.card-level {
    background-color: var(--accent-color);
    color: #121212;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}
.card-item.grayscale .card-level {
    background-color: #555555;
    color: #aaaaaa;
}

.theme-selector-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    border-top: 3px solid #333333;
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
    overflow-x: auto;
    z-index: 1000;
}
.btn-theme {
    background-color: #2a2a2a;
    color: #cccccc;
    border: 1px solid #444444;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    white-space: nowrap;
    transition: all 0.2s;
}
.btn-theme:hover {
    background-color: #3a3a3a;
    color: #ffffff;
}
.btn-theme.active {
    background-color: var(--accent-color);
    color: #121212;
    border-color: var(--accent-color);
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    user-select: none;
}
.modal-content {
    max-width: 95%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 4px;
    transition: filter 0.3s, opacity 0.3s;
    user-select: none;
}
.modal-content.grayscale {
    filter: grayscale(100%);
    opacity: 0.35;
}
.modal-caption {
    position: absolute;
    bottom: 40px;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    background-color: rgba(0,0,0,0.6);
    padding: 10px 20px;
    border-radius: 20px;
    pointer-events: none;
}
.footer {
    text-align: center;
    padding: 40px 20px;
    color: #777777;
    font-size: 0.9rem;
    border-top: 1px solid #333333;
    margin-top: 40px;
}
.footer a {
    color: var(--accent-color);
    text-decoration: none;
}
.footer a:hover {
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .card-grid { grid-template-columns: repeat(3, 1fr); gap: 15px; }
}
@media (max-width: 768px) {
    .card-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 12px; 
    }
    body { 
        padding: 15px; 
        padding-bottom: 240px; 
    }
    h1 { font-size: 1.6rem; }
    .btn-login, .btn-logout { width: 100%; text-align: center; box-sizing: border-box; margin-left: 0 !important; margin-bottom: 10px; }
    
    .music-platform-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .btn-platform {
        width: 100%;
        box-sizing: border-box;
        padding: 9px 6px;
        font-size: 0.8rem;
    }

    .theme-selector-bar {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr); 
        gap: 6px;
        padding: 10px;
        background-color: #161616;
    }
    .btn-theme {
        padding: 8px 6px;
        font-size: 0.8rem;
        text-align: center;
        white-space: normal;
    }
}
@media (max-width: 480px) {
    .form-group { display: block; margin-right: 0; width: 100%; }
    .form-control { width: 100% !important; box-sizing: border-box; }
    .btn-admin-action { width: 100%; box-sizing: border-box; }
    .app-desc { font-size: 0.95rem; padding: 14px; }
    .modal-caption { font-size: 0.95rem; bottom: 20px; padding: 8px 15px; }
}
