/* CSS Design System for Shorts Studio */

:root {
    --bg-dark: #0a0b10;
    --card-bg: rgba(20, 22, 33, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --accent-red: #ef4444;
    --accent-gold: #fbbf24;
    --phone-bg: #000000;
    --font-outfit: 'Outfit', sans-serif;
    --font-inter: 'Inter', 'Noto Sans KR', sans-serif;
    
    /* Input/Box UI backgrounds for dark mode */
    --input-bg: rgba(15, 17, 26, 0.8);
    --segment-bg: rgba(0, 0, 0, 0.25);
    --notice-bg: rgba(255, 255, 255, 0.03);
    --scroll-thumb: rgba(255, 255, 255, 0.12);
    --slider-track: rgba(255, 255, 255, 0.15);
    
    /* Segment list & items variables for dark mode */
    --seg-list-bg: rgba(10, 11, 16, 0.5);
    --seg-item-bg: rgba(30, 41, 59, 0.4);
    --seg-item-hover-bg: rgba(30, 41, 59, 0.6);
    --seg-item-border: rgba(255, 255, 255, 0.05);
    --seg-item-hover-border: rgba(59, 130, 246, 0.3);
}

body.light-mode {
    --bg-dark: #f1f5f9; /* Soft Slate 100 white-ish background */
    --card-bg: rgba(255, 255, 255, 0.75); /* Frosted white glass card */
    --border-color: rgba(15, 23, 42, 0.12); /* Clean light gray borders */
    --text-primary: #0f172a; /* Dark Slate 900 */
    --text-secondary: #475569; /* Gray Slate 600 */
    --primary-color: #2563eb; /* Deeper blue for legibility in light mode */
    --primary-glow: rgba(37, 99, 235, 0.2);
    
    /* Input/Box UI backgrounds for light mode */
    --input-bg: rgba(255, 255, 255, 0.9);
    --segment-bg: rgba(15, 23, 42, 0.05); /* Soft light gray card background */
    --notice-bg: rgba(0, 0, 0, 0.03);
    --scroll-thumb: rgba(0, 0, 0, 0.15);
    --slider-track: rgba(15, 23, 42, 0.18); /* Soft slate-colored track for visibility in light mode */
    
    /* Segment list & items variables for light mode */
    --seg-list-bg: rgba(15, 23, 42, 0.03);
    --seg-item-bg: #ffffff; /* Crisp clean white background card */
    --seg-item-hover-bg: rgba(255, 255, 255, 1);
    --seg-item-border: rgba(15, 23, 42, 0.08);
    --seg-item-hover-border: rgba(37, 99, 235, 0.35);
}

body.light-mode .background-glow {
    opacity: 0.04; /* Dim background visual glows */
}

/* Global smooth transition for theme switching */
body, .glass-card, select, textarea, input, .color-picker-wrapper, .notice-box {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

@font-face {
    font-family: 'GmarketSansBold';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansBold.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-inter);
    height: 100vh; /* Lock body height to avoid flex jump scroll bugs on desktop */
    overflow: hidden; /* Lock viewport scrolling on desktop, scrollbars are inside panels */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    
    /* Font rendering optimization on Windows/macOS */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Background animated glowing gradient blobs */
.background-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
    animation: float 25s infinite alternate;
}

.glow-1 {
    background: radial-gradient(circle, #3b82f6 0%, #1d4ed8 100%);
    top: -100px;
    left: -100px;
}

.glow-2 {
    background: radial-gradient(circle, #8b5cf6 0%, #6d28d9 100%);
    bottom: -100px;
    right: -100px;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(80px, 50px) scale(1.1); }
    100% { transform: translate(-40px, -80px) scale(0.9); }
}

/* Layout container */
.studio-container {
    width: 100%;
    max-width: 1400px; /* Centered layout width */
    height: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 10;
    overflow-y: auto;
    
    /* Smooth page load animation using opacity fade-in only (no transforms to prevent flex centering alignment bugs) */
    opacity: 0;
    animation: studioFadeIn 0.4s ease-in-out 0.1s forwards;
}

@keyframes studioFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 900px) {
    body {
        height: auto;
        overflow-y: auto; /* Enable natural page scrolling for tablet/mobile viewports */
    }
    .studio-container {
        grid-template-columns: 1fr;
        height: auto;
    }
}

/* Glass card utility */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Control Panel (Sidebar) */
.control-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 24px;
    overflow-y: auto;
}

.control-panel::-webkit-scrollbar {
    width: 6px;
}

.control-panel::-webkit-scrollbar-track {
    background: transparent;
}

.control-panel::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 3px;
}

.control-panel::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Header */
.studio-header {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 0 15px var(--primary-glow);
}

.studio-header h1 {
    font-family: var(--font-outfit);
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #3b82f6, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Form layout */
.section-group {
    margin-bottom: 28px;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    width: 18px;
    height: 18px;
    color: #3b82f6;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid .form-group {
    margin-bottom: 0;
}

/* Custom select dropdown */
.select-wrapper {
    position: relative;
}

select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 36px 10px 14px; /* Expanded right padding to prevent text from colliding with chevron icon */
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    
    /* Web Font anti-aliasing optimization for dropdown elements */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.select-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    pointer-events: none;
}

/* Segment items (Scripts list editor) */
.segments-list {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    background: var(--seg-list-bg);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.segment-item {
    background: var(--seg-item-bg);
    border: 1px solid var(--seg-item-border);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    transition: all 0.2s ease;
}

.segment-item:hover {
    border-color: var(--seg-item-hover-border);
    background: var(--seg-item-hover-bg);
}

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

.segment-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #3b82f6;
}

.segment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.duration-input {
    width: 50px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 0.75rem;
    text-align: center;
}

.delete-segment-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.delete-segment-btn:hover {
    color: var(--accent-red);
}

.segment-textarea {
    width: 100%;
    min-height: 52px;
    background: var(--segment-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 8px;
    color: var(--text-primary);
    font-size: 0.8rem;
    resize: none;
    font-family: inherit;
    line-height: 1.4;
}

.segment-textarea:focus {
    border-color: #3b82f6;
    outline: none;
}

.highlight-word-input {
    width: 100%;
    background: var(--segment-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 8px;
    color: var(--text-primary);
    font-size: 0.75rem;
}

.highlight-word-input:focus {
    border-color: #3b82f6;
    outline: none;
}

/* Color Picker */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 12px;
}

.color-picker-wrapper input[type="color"] {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    background: none;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

.color-val {
    font-family: var(--font-outfit);
    font-size: 0.8rem;
    color: var(--text-primary);
}

/* Slider and Ranges */
.range-slider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.range-slider input[type="range"] {
    flex: 1;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--slider-track);
    outline: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    transition: transform 0.1s;
}

.range-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.range-val {
    font-family: var(--font-outfit);
    font-size: 0.75rem;
    color: var(--text-secondary);
    width: 32px;
    text-align: right;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--slider-track);
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked + .slider {
    background-color: #3b82f6;
}

input:focus + .slider {
    box-shadow: 0 0 1px #3b82f6;
}

input:checked + .slider:before {
    transform: translateX(16px);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Buttons */
button {
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary-btn {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 14px 20px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn-inline {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    height: 36px;
}

.primary-btn-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.primary-btn-inline:active {
    transform: translateY(0);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

/* Pulsing effect for record button */
.pulse-glow {
    position: relative;
}

.pulse-glow::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 12px;
    box-shadow: 0 0 15px var(--primary-glow);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.pulse-glow:hover::after {
    opacity: 1;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    70% { transform: scale(1.05); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

.export-actions {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.export-note {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 8px;
}

/* PREVIEW AREA (Right Side) */
.preview-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 980px; /* Increased height to give comfortable padding and margins */
    min-height: 980px;
    padding: 18px 0 18px 0;
    box-sizing: border-box;
}

.preview-header {
    text-align: center;
    margin-bottom: 12px; /* Breathing room below the header */
}

.preview-header h2 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.preview-header p {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Phone Mockup */
.phone-mockup-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0; /* Allow wrapper to shrink freely in smaller screens */
    margin: 8px 0; /* Breathing room around the phone preview */
    width: 100%;
    overflow: visible; /* Let the phone box-shadow bleed naturally without clipping */
}

.phone-frame {
    height: 750px; /* Stable fixed height to prevent resizing/shifting when options drawer height changes */
    max-height: 100%; /* Scale down gracefully on smaller viewports */
    max-width: 100%; /* Prevent horizontal overflow */
    aspect-ratio: 4 / 5; /* Match 4:5 vertical canvas default */
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2), 0 0 20px rgba(139, 92, 246, 0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
}

.phone-notch {
    position: absolute;
    top: 0;
    width: 140px;
    height: 18px;
    background: #27272a;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 100;
}

.phone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: var(--phone-bg);
    overflow: hidden;
}

/* Main shorts canvas */
#shorts-canvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Phone overlay mock UI (YouTube Shorts UI) */
.shorts-ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none; /* Let clicks pass to screen if necessary */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    z-index: 10;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0) 80%, rgba(0,0,0,0.3) 100%);
}

.right-actions {
    position: absolute;
    right: 8px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    gap: 4px;
}

.action-item i {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.action-item span {
    font-size: 0.65rem;
    font-weight: 500;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.bottom-info {
    max-width: 80%;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.creator-handle {
    font-size: 0.8rem;
    font-weight: 700;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.music-track {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
    animation: marquee 10s linear infinite;
    white-space: nowrap;
}

.music-track i {
    width: 12px;
    height: 12px;
}

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

/* Recording Overlay inside phone screen */
.recording-overlay {
    position: absolute;
    top: 24px;
    left: 16px;
    background: rgba(239, 68, 68, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 20px;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 50;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.rec-dot {
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    animation: flash 1s infinite alternate;
}

.recording-overlay span {
    color: white;
    font-family: var(--font-outfit);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

@keyframes flash {
    0% { opacity: 0.2; }
    100% { opacity: 1; }
}

/* Playback Control Bar */
.playback-controls {
    width: 100%;
    max-width: 440px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-bar-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar-area span {
    font-family: var(--font-outfit);
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 32px;
}

.timeline-bar {
    flex: 1;
    height: 6px;
    background: var(--slider-track);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.timeline-progress {
    height: 100%;
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    border-radius: 3px;
    width: 0;
}

.control-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.play-btn-large {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3b82f6;
    border: none;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.play-btn-large:hover {
    background: #2563eb;
    transform: scale(1.08);
    box-shadow: 0 0 18px rgba(59, 130, 246, 0.6);
}

.play-btn-large i {
    width: 20px;
    height: 20px;
}

/* MODAL popup */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(4, 5, 8, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s;
}

.modal-content {
    width: 90%;
    max-width: 400px;
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-color);
}

.modal-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.modal-progress-container {
    width: 100%;
    height: 8px;
    background: var(--slider-track);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.modal-progress-bar {
    height: 100%;
    background: linear-gradient(to right, #10b981, #3b82f6);
    width: 0;
    transition: width 0.1s linear;
}

.modal-percent {
    font-family: var(--font-outfit);
    font-size: 1rem;
    font-weight: 700;
    color: #10b981;
}

.spin {
    animation: rotate 1.2s linear infinite;
}

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

/* Notice Board & Feedback Styles */
.notice-box {
    position: relative;
    background: var(--notice-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 35px 12px 12px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-secondary);
}
.notice-edit-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.notice-edit-btn:hover {
    opacity: 1.0;
    color: var(--primary-color);
}
.notice-edit-btn svg {
    width: 14px;
    height: 14px;
}
.feedback-item {
    border-bottom: 1px solid var(--border-color);
    padding: 6px 4px;
    font-size: 0.78rem;
}
.feedback-item:last-child {
    border-bottom: none;
}
.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.feedback-badge {
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
}
.badge-suggest { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-bug { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-idea { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.feedback-date {
    color: var(--text-secondary);
    font-size: 0.65rem;
}
.feedback-content {
    color: #fff;
    word-break: break-all;
    white-space: pre-wrap;
    line-height: 1.35;
}

/* Right Panel (Notice & Feedback Sidebar) */
.right-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 24px;
    overflow-y: auto;
    gap: 20px;
}

@media (max-width: 1200px) {
    .right-panel {
        height: auto;
        margin-top: 20px;
    }
}

.right-panel::-webkit-scrollbar {
    width: 6px;
}

.right-panel::-webkit-scrollbar-track {
    background: transparent;
}

.right-panel::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 3px;
}

.right-panel::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.notice-board-block, .feedback-board-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.right-panel .section-title {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
}

/* Helpers */
.hide {
    display: none !important;
}

/* Center Play Button Overlay inside Phone Screen */
.center-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    opacity: 0; /* Hidden by default */
    pointer-events: none; /* Disable clicks when hidden */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    outline: none;
}

/* Fade in only when hovering the phone screen */
.phone-screen:hover .center-play-btn {
    opacity: 1;
    pointer-events: auto; /* Enable clicks when visible */
    transform: translate(-50%, -50%) scale(1);
}

.center-play-btn:hover {
    background: rgba(59, 130, 246, 0.7);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 0 18px rgba(59, 130, 246, 0.6);
}

.center-play-btn i {
    width: 24px;
    height: 24px;
    fill: white; /* Make the play icon solid */
}

/* Align play icon triangle properly */
.center-play-btn[data-state="play"] i {
    margin-left: 3px; /* visual center offset for play */
}

.center-play-btn[data-state="pause"] i {
    margin-left: 0; /* centered for pause */
}
