/* Rahyang Animasi Pro v2 - Studio Styles */
:root {
    --bg-studio: #090612;
    --bg-panel: rgba(24, 14, 48, 0.78);
    --bg-card: rgba(38, 20, 74, 0.65);
    --border-subtle: rgba(168, 85, 247, 0.22);
    --accent-orange: #f97316;
    --accent-pink: #ec4899;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--bg-studio);
    background-image:
        radial-gradient(circle at 15% 10%, rgba(139, 92, 246, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 85% 20%, rgba(249, 115, 22, 0.14) 0%, transparent 40%),
        radial-gradient(circle at 50% 90%, rgba(236, 72, 153, 0.12) 0%, transparent 50%);
    background-attachment: fixed;
    color: #f8fafc;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Clash Display', 'Poppins', sans-serif;
}

/* Regional & RTL Fonts */
[lang="ar"], .arabic-text { font-family: 'Tajawal', sans-serif; }
.javanese-text { font-family: 'Noto Sans Javanese', sans-serif; }
.sundanese-text { font-family: 'Noto Sans Sundanese', sans-serif; }
.korean-text { font-family: 'Noto Sans KR', 'Noto Sans CJK KR', sans-serif; }
.japanese-text { font-family: 'Noto Sans JP', 'Noto Sans CJK JP', sans-serif; }

/* Fast Loader */
#fast-loader {
    position: fixed;
    inset: 0;
    background-color: #090612;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    transition: opacity 0.35s ease-out;
}
.fast-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(168, 85, 247, 0.25);
    border-top-color: #f97316;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin-bottom: 14px;
}
.fast-text {
    color: #e9d5ff;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.4px;
}
#app-content {
    opacity: 0;
    transition: opacity 0.4s ease-in;
}
.app-ready #app-content { opacity: 1; }
.app-ready #fast-loader { opacity: 0; pointer-events: none; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader {
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top: 3px solid #f97316;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 0.9s linear infinite;
}

/* Glass Cards */
.studio-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.55);
}

.studio-subcard {
    background: var(--bg-card);
    border: 1px solid rgba(192, 132, 252, 0.18);
}

/* Selection Buttons */
.selection-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.selection-btn:hover {
    border-color: rgba(249, 115, 22, 0.5);
    transform: translateY(-1px);
}
.selection-btn.selected {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.92), rgba(219, 39, 119, 0.92)) !important;
    border-color: rgba(251, 146, 60, 0.8) !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 8px 24px -4px rgba(249, 115, 22, 0.45);
}
.selection-btn.selected span {
    color: #ffffff !important;
}
.selection-btn.selected .icon-wrapper {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    transform: scale(1.06);
}

/* Completed Scene Card State */
.scene-card {
    scroll-margin-top: 6rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.scene-card.scene-completed {
    border-color: rgba(16, 185, 129, 0.55) !important;
    box-shadow: 0 12px 30px -10px rgba(16, 185, 129, 0.25);
}

/* Scrollbars */
.thin-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.thin-scrollbar::-webkit-scrollbar-track { background: rgba(30, 15, 60, 0.6); border-radius: 999px; }
.thin-scrollbar::-webkit-scrollbar-thumb { background: rgba(192, 38, 211, 0.55); border-radius: 999px; }
.thin-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(232, 121, 249, 0.8); }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Inputs */
input[type="text"],
input[type="password"],
input[type="url"],
input[type="number"],
textarea,
select {
    color: #ffffff;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

.aspect-16-9 { aspect-ratio: 16 / 9; }
.aspect-9-16 { aspect-ratio: 9 / 16; }

/* Modals & Drawers */
.modal.hidden { display: none; }

/* Tab pills */
.tab-btn.active {
    background: linear-gradient(135deg, #f97316, #ec4899);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}
