body {
    font-family: 'Press Start 2P', monospace;

    background: #11142d;
    color: #fe53bb;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.options-panel {
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    background: #181b38;
    color: #fe53bb;
    padding: 0.5rem 1rem;
    box-sizing: border-box;
    font-size: 0.7rem;
    border-bottom: 1px solid #2c2f4a;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
}

.options-panel label {
    font-size: 0.7rem;
}

.options-panel input[type="text"] {
    font-family: inherit;
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
    border: 1px solid #2c2f4a;
    background: #23264a;
    color: #fe53bb;
    border-radius: 2px;
    outline: none;
    width: 340px;
    max-width: 40vw;
}

.options-panel input[type="range"] {
    accent-color: #fe53bb;
}

.banner-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 40vh;
    overflow: hidden;
    background: transparent;
}

.scrolling-text {
    white-space: nowrap;
    font-size: 2rem;
    animation: scroll-left 10s linear infinite;
    color: inherit;
}

@keyframes scroll-left {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* Paused state */
.scrolling-text.paused {
    animation-play-state: paused;
}

/* Settings Button */
.settings-btn {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    width: 50px;
    height: 50px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 0;
    overflow: visible;
    box-shadow: 0 2px 16px 0 rgba(0,0,0,0.25);
}

@media (max-width: 600px) {
  .settings-btn {
    top: 12px !important;
    right: 12px !important;
    width: 44px;
    height: 44px;
  }
}

.option-btn {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: none;
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(5px);
}

.option-btn {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: none;
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(5px);
}

.option-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    padding: 2px;
    background: conic-gradient(
        from var(--angle),
        var(--text-primary) 0%,
        var(--text-secondary) 25%,
        var(--accent) 50%,
        var(--text-secondary) 75%,
        var(--text-primary) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: none;
    z-index: -1;
}

.option-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, var(--text-primary), var(--text-secondary));
    border-radius: 3px;
    transition: none;
    transform-origin: center;
    box-shadow: 0 0 5px var(--shadow-glow);
}

.option-btn:hover {
    transform: none;
}

/* Animation when panel is open */
.controls-panel.open + .settings-btn .option-btn span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.controls-panel.open + .settings-btn .option-btn span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.controls-panel.open + .settings-btn .option-btn span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Accessibility Button */
.accessibility-btn {
    position: fixed;
    top: 2rem;
    left: 2rem;
    background: rgba(4, 254, 254, 0.2);
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: none;
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.accessibility-btn:hover {
    background: rgba(4, 254, 254, 0.4);
    box-shadow: var(--shadow-glow-blue);
    transform: none;
}

/* Controls Panel */
.controls-panel {
    position: fixed;
    top: 0;
    right: -420px; /* Start completely off-screen */
    width: 400px;
    max-width: 400px;
    height: 100vh;
    background: rgba(26, 29, 58, 0.95);
    backdrop-filter: blur(20px);
    border-left: 2px solid var(--text-primary);
    transition: none;
    z-index: 999;
    overflow-y: auto;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    transform: none;
    visibility: visible;
    display: block;
}

.controls-panel.fullscreen {
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    border-left: none;
    border-right: none;
    box-shadow: none;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: none;
}

/* Animate panel shrinking and moving to option button */
.controls-panel.suck-to-button {
    animation: none;
    left: auto !important;
    right: 20px !important;
    top: 20px !important;
    width: 50px !important;
    height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    opacity: 0.9;
    overflow: hidden;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.controls-panel.suck-to-button .panel-header,
.controls-panel.suck-to-button .panel-content {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}


.controls-panel.fullscreen .panel-header {
    position: static;
    width: 100%;
    background: transparent;
    border: none;
    justify-content: center;
    padding-top: 2rem;
}

.controls-panel.fullscreen .panel-content {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


/* When panel is open - controlled by JavaScript */
.controls-panel.open {
    pointer-events: all;
}

/* When panel is closed - controlled by JavaScript */
.controls-panel:not(.open) {
    pointer-events: none;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(254, 83, 187, 0.3);
    position: sticky;
    top: 0;
    background: rgba(26, 29, 58, 0.95);
    backdrop-filter: blur(20px);
}

.panel-header h2 {
    font-size: 14px;
    color: var(--text-primary);
    text-shadow: var(--shadow-glow);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--accent);
    text-shadow: var(--shadow-glow-yellow);
    transform: scale(1.2);
}

.panel-content {
    padding: 1.5rem;
}

.control-group {
    margin-bottom: 2rem;
}

.control-group label {
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Text Input */
#textInput {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--text-primary);
    color: var(--white);
    padding: 0.75rem;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    border-radius: 4px;
    resize: vertical;
    min-height: 80px;
    transition: all 0.3s ease;
}

#textInput:focus {
    outline: none;
    box-shadow: var(--shadow-glow);
    border-color: var(--accent);
}



/* Sliders */
.slider {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-glow);
}

/* Toggle Switch */
.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 10px;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 50px;
    height: 24px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--text-primary);
    border-radius: 12px;
    position: relative;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--text-primary);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
    background: rgba(254, 83, 187, 0.3);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(26px);
}

/* Theme Buttons */
.theme-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.theme-btn {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 0.75rem;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: center;
}

.theme-btn:hover,
.theme-btn.active {
    background: rgba(4, 254, 254, 0.2);
    box-shadow: var(--shadow-glow-blue);
    transform: translateY(-2px);
}

/* Custom Colors */
.custom-colors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: end;
}

.custom-colors input[type="color"] {
    width: 100%;
    height: 40px;
    border: 2px solid var(--text-primary);
    border-radius: 4px;
    background: none;
    cursor: pointer;
}

/* AI Suggestions */
.ai-section input[type="text"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--text-secondary);
    color: var(--white);
    padding: 0.75rem;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.generate-btn {
    width: 100%;
    background: rgba(4, 254, 254, 0.2);
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 0.75rem;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.generate-btn:hover {
    background: rgba(4, 254, 254, 0.4);
    box-shadow: var(--shadow-glow-blue);
}

.suggestions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.suggestion-item {
    background: rgba(255, 219, 59, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.5rem;
    font-size: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-item:hover {
    background: rgba(255, 219, 59, 0.2);
    box-shadow: var(--shadow-glow-yellow);
}

/* Control Buttons */
.control-buttons,
.export-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.control-btn,
.export-btn {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--text-primary);
    color: var(--text-primary);
    padding: 0.75rem;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 100px;
}

.control-btn:hover,
.export-btn:hover {
    background: rgba(254, 83, 187, 0.2);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    text-align: center;
    padding: 1rem;
    font-size: 8px;
    color: var(--text-secondary);
    border-top: 1px solid rgba(4, 254, 254, 0.3);
    background: rgba(0, 0, 0, 0.2);
}

.footer kbd {
    background: rgba(255, 219, 59, 0.2);
    color: var(--accent);
    padding: 0.2rem 0.4rem;
    border-radius: 2px;
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .controls-panel {
        width: 85vw;
        max-width: none;
    }
    
    .scrolling-text {
        font-size: 24px;
    }
    
    .settings-btn,
    .accessibility-btn {
        width: 50px;
        height: 50px;
        top: 1rem;
    }
    
    .settings-btn {
        right: 1rem;
    }
    
    .accessibility-btn {
        left: 1rem;
    }
    
    .banner-container {
        padding: 1rem;
        min-height: 50vh;
    }
    
    .theme-buttons {
        grid-template-columns: 1fr;
    }
    
    .control-buttons,
    .export-buttons {
        flex-direction: column;
    }
    
    .custom-colors {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .scrolling-text {
        font-size: 18px;
    }
    
    .panel-content {
        padding: 1rem;
    }
    
    .footer {
        font-size: 7px;
    }
}

/* Animations */
@keyframes glow {
    0%, 100% { text-shadow: var(--shadow-glow); }
    50% { text-shadow: var(--shadow-glow), var(--shadow-glow-blue); }
}

.scrolling-text.animated-glow {
    animation: scroll-right-to-left 15s linear infinite, glow 2s ease-in-out infinite;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1s ease-in-out infinite;
}
