/* =============================================
   룰렛 스타일
   ============================================= */

html { background: #000; }

.rl-body {
    overflow: hidden;
    height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #f0f0f0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.rl-game {
    width: 100%;
    height: 100dvh;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Top Bar */
.rl-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    z-index: 10;
    flex-shrink: 0;
}
.rl-back {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
}
.rl-back:hover { color: #fff; }
.rl-info-badge {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0,0,0,0.2);
}

/* Content */
.rl-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 20px;
    overflow-y: auto;
}

/* States */
.state-setup { background: #0f0f1a; }
.state-playing { background: #0f0f1a; }
.state-result { background: #0f0f1a; }

/* ===== Setup Screen ===== */
.rl-setup-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
    text-align: center;
}
.rl-setup-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 20px;
    text-align: center;
}

.rl-section-label {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
    width: 100%;
    max-width: 360px;
}

.rl-input-row {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 360px;
    margin-bottom: 12px;
}
.rl-input {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 15px;
    outline: none;
}
.rl-input:focus {
    border-color: rgba(236,72,153,0.5);
}
.rl-input::placeholder {
    color: rgba(255,255,255,0.3);
}
.rl-btn-add {
    padding: 12px 18px;
    background: rgba(236,72,153,0.2);
    border: 2px solid rgba(236,72,153,0.4);
    border-radius: 10px;
    color: #EC4899;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.rl-btn-add:active { transform: scale(0.95); }

.rl-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    max-width: 360px;
    margin-bottom: 20px;
    min-height: 36px;
}
.rl-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.rl-tag-name {
    background: rgba(78,205,196,0.15);
    color: #4ECDC4;
    border: 1px solid rgba(78,205,196,0.3);
}
.rl-tag-remove {
    cursor: pointer;
    opacity: 0.6;
    font-size: 12px;
}
.rl-tag-remove:hover { opacity: 1; }

.rl-btn-start {
    display: inline-block;
    padding: 16px 48px;
    background: linear-gradient(135deg, #EC4899, #8B5CF6);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s;
    margin-top: 8px;
}
.rl-btn-start:active { transform: scale(0.95); }
.rl-btn-start:disabled {
    opacity: 0.4;
    pointer-events: none;
}

.rl-error {
    color: #FF6B6B;
    font-size: 13px;
    margin-top: 8px;
}

/* ===== Playing Screen ===== */
.rl-wheel-wrap {
    position: relative;
    width: 100%;
    max-width: 340px;
    aspect-ratio: 1;
    margin: 0 auto 16px;
}
.rl-wheel-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* 화살표 표시기 */
.rl-pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 28px solid #FFD700;
    filter: drop-shadow(0 2px 6px rgba(255,215,0,0.5));
    z-index: 5;
}

.rl-spin-btn {
    padding: 16px 48px;
    background: linear-gradient(135deg, #EC4899, #8B5CF6);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s;
    margin-bottom: 12px;
}
.rl-spin-btn:active { transform: scale(0.95); }
.rl-spin-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.rl-btn-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-shrink: 0;
}
.rl-btn-reset {
    padding: 12px 24px;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.rl-btn-reset:active { transform: scale(0.95); }

/* Toast */
.rl-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    white-space: nowrap;
}
.rl-toast-show {
    opacity: 1;
    pointer-events: auto;
}
