/* Stream Alerts Customizer Styles */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700&family=Roboto:wght@300;400;500;700&family=Open+Sans:wght@300;400;600;700&family=Montserrat:wght@300;400;500;600&family=Poppins:wght@300;400;500;600&family=Oswald:wght@300;400;500&display=swap');

/* Changelog Modal Styles */
.changelog-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.changelog-modal {
    background: #111827;
    border-radius: 10px;
    max-width: 700px;
    max-height: 80vh;
    width: 90%;
    overflow: hidden;
}

.changelog-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.changelog-modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: #e5e7eb;
}

.changelog-modal-close {
    background: transparent;
    border: none;
    color: #e5e7eb;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
}

.changelog-modal-content {
    padding: 16px;
    background: #020617;
    color: #e5e7eb;
    overflow-y: auto;
    max-height: calc(80vh - 60px);
}

.changelog-modal-content h1,
.changelog-modal-content h2,
.changelog-modal-content h3 {
    color: #e5e7eb;
}

.changelog-modal-content a {
    color: #38bdf8;
}

@font-face {
    font-family: 'GamestationCond';
    src: url('../fonts/GamestationCond.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* Base Styles */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #f72585;
    --background-dark: #121212;
    --background-darker: #0d0d0d;
    --background-light: #1a1a1a;
    --text-light: #ffffff;
    --text-gray: #b3b3b3;
    --border-color: #333333;
    --success-color: #4ade80;
    --warning-color: #fbbf24;
    --error-color: #f87171;
    --border-radius: 10px;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--background-darker), #1a1a2e);
    color: var(--text-light);
    min-height: 100vh;
    padding: 20px;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
        margin-bottom: 15px;
    padding: 20px;
    background: rgba(26, 26, 26, 0.7);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.header-logo {
    width: 340px;
}

.header-divider {
    width: 2px;
    align-self: stretch;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), rgba(255,255,255,0));
    border-radius: 999px;
}

.header h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.header-overlay-url {
    flex: 1 1 320px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.header-overlay-url h3 {
    font-size: 1.5rem;
    margin-bottom: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1.2rem;
    color: var(--text-gray);
    font-weight: 300;
}

/* Main Container */
.container {
    display: flex;
    gap: 15px;
    max-width: 100%;
    margin: 0 auto;
}

body {
    padding-bottom: 80px;
}

/* Settings Panel - Left Side */
.settings-panel {
    flex: 1;
    max-width: 30%;
    background: rgba(26, 26, 26, 0.8);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: calc(100vh - 310px);
    overflow-y: auto;
}

/* Preview Panel - Right Side */
.preview-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(26, 26, 26, 0.8);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: calc(100vh - 310px);
    overflow-y: auto;
}

/* Panel Headers */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h2 {
    font-size: 1.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-header h2 i {
    color: var(--primary-color);
}

/* Shared customizer chrome (shoutout-style layout; colors via CSS vars) */
.header-logo {
    width: 340px;
    max-width: 100%;
    height: auto;
    display: block;
}

.header h1,
.header-overlay-url h3 {
    font-family: 'Orbitron', sans-serif;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.panel-header-main {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 16px;
    min-width: 0;
    flex: 1;
}

.panel-header h2 {
    font-size: 1.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin: 0;
}

.preview-support-note {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    max-width: none;
    padding: 8px 14px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-gray);
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary-color) 22%, transparent);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.preview-support-note i {
    color: var(--primary-color);
    font-size: 0.78rem;
    opacity: 0.9;
}

.preview-support-note a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.preview-support-note a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.preview-support-note strong {
    color: var(--text-light);
    font-weight: 600;
}

.panel-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-header-actions .connection-indicator {
    position: static;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.panel-header-actions .connection-indicator .sb-logo {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
}

.panel-header-actions .connection-indicator .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
    flex-shrink: 0;
}

.panel-header-actions .connection-indicator.connecting .status-dot {
    background: var(--warning-color, #fbbf24);
    animation: preview-pulse-dot 1s infinite;
}

.panel-header-actions .connection-indicator.connected .status-dot {
    background: var(--success-color, #4ade80);
    box-shadow: 0 0 8px var(--success-color, #4ade80);
}

.panel-header-actions .connection-indicator.disconnected .status-dot {
    background: var(--error-color, #f87171);
}

@keyframes preview-pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}


/* Settings Sections */
.settings-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(30, 30, 30, 0.6);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
}

.settings-section h3 i {
    color: var(--accent-color);
}

/* Setting Groups */
.setting-group {
    margin-bottom: 20px;
    position: relative;
}

.setting-group::after {
    content: "";
    position: absolute;
    inset: -9px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(67, 97, 238, 0.15);
    box-shadow: 0 0 18px rgba(67, 97, 238, 0.25);
    opacity: 0;
    transition: opacity 0.2s ease, border-color 0.2s ease;
    pointer-events: none;
}

.setting-group:hover::after {
    opacity: 1;
    border-color: rgba(67, 97, 238, 0.35);
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-gray);
}

.style-select, input[type="color"], input[type="range"], input[type="number"], input[type="text"].text-input {
    width: 100%;
    padding: 12px;
    border-radius: var(--border-radius);
    background: rgba(40, 40, 40, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 1rem;
}

input[type="number"], input[type="text"].text-input {
    transition: all 0.3s ease;
}

input[type="number"]:focus, input[type="text"].text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

input[type="color"] {
    height: 50px;
    cursor: pointer;
}

input[type="range"] {
    padding: 0;
}

.value-display {
    display: inline-block;
    margin-top: 5px;
    padding: 5px 10px;
    background: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 500;
}

/* Checkbox Group */
.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 400;
}

/* Buttons */
.save-button, .reset-button, .refresh-button, .alert-button {
    padding: 12px 20px;
    border-radius: var(--border-radius);
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.save-button {
    background: linear-gradient(90deg, var(--primary-color), #3a0ca3);
    color: white;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.reset-button {
    background: transparent;
    color: var(--text-gray);
    border: 1px solid var(--border-color);
}

.refresh-button {
    background: rgba(40, 40, 40, 0.8);
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.alert-button {
    background: rgba(40, 40, 40, 0.8);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    flex: 1;
    justify-content: center;
}

.save-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.reset-button:hover, .refresh-button:hover, .alert-button:hover {
    background: rgba(60, 60, 60, 0.8);
    transform: translateY(-2px);
}

.settings-section .settings-section {
    display: flex;
    gap: 15px;
}

/* Preview Container */
.preview-container {
    flex: 1;
    margin-bottom: 25px;
    min-height: 600px;
    display: flex;
}

#alerts-preview {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, #0d0d0d, #1a1a2e);
}

/* Preview Controls */
.preview-controls {
    padding: 20px;
    background: rgba(30, 30, 30, 0.6);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-controls h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
}

.preview-controls h3 i {
    color: var(--accent-color);
}

.alert-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        flex-direction: column;
    }
    
    .settings-panel, .preview-panel {
        width: 100%;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-overlay-url {
        max-width: 480px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .alert-buttons {
        flex-direction: column;
    }
    
    .alert-button {
        width: 100%;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(30, 30, 30, 0.5);
    border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb:hover {
    background: #3a0ca3;
}

/* Custom Scrollbar for Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(30, 30, 30, 0.5);
}

/* Overlay URL Section Styles */
.url-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.url-input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(30, 30, 30, 0.8);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-light);
    font-size: 14px;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.generate-button, .copy-button {
    padding: 12px 16px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    white-space: nowrap;
}

.generate-button {
    background: linear-gradient(90deg, var(--primary-color), #3a0ca3);
    color: white;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.generate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.copy-button {
    background: linear-gradient(90deg, var(--success-color), #22c55e);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.copy-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.4);
}

.copy-button:disabled {
    background: rgba(100, 100, 100, 0.5);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    box-shadow: none;
}

.copy-button.copied {
    background: linear-gradient(90deg, var(--success-color), #16a34a);
    animation: pulse 0.3s ease;
}

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

.url-help {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-gray);
    font-style: italic;
}

.header-overlay-url .url-help {
    font-size: 12px;
    line-height: 1.4;
}


/* URL Buttons Container */
.url-buttons {
    display: flex;
    gap: 10px;
    margin-top: 0;
    flex-shrink: 0;
}

/* Range Slider Styles */
input[type="range"].range-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    outline: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

input[type="range"].range-input:hover {
    opacity: 1;
}

input[type="range"].range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-light);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

input[type="range"].range-input::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(67, 97, 238, 0.5);
}

input[type="range"].range-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-light);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

input[type="range"].range-input::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(67, 97, 238, 0.5);
}

.range-value {
    font-weight: 500;
    color: var(--text-light);
}

/* Footer Styles */
.site-footer {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    padding: 12px 30px;
    background: rgba(26, 26, 26, 0.8);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    z-index: 100;
}

/* Ko-Fi Logo Design */
.fa-ko-fi::before {
    content: "\f0f4";
    display: inline-block;
    font-size: 1.1em;
    line-height: 0.45em;
    margin: -0.45em 0 0 -0.2em;
    overflow-y: hidden;
    padding-top: 0.45em;
}

.fa-ko-fi::after {
    color: #000;
    content: "\f004";
    font-size: 50%;
    font-weight: 900;
    margin: 0.5em 0 0 -2em;
    position: absolute;
}

.footer-branding {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #94a3b8;
    font-family: 'Poppins', sans-serif;
}

.footer-branding .heart {
    color: #f72585;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.footer-branding a {
    color: #4361ee;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer-branding a:hover {
    color: #f72585;
}

.footer-divider {
    width: 1px;
    height: 24px;
    background: linear-gradient(to bottom, transparent, rgba(148, 163, 184, 0.4), transparent);
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(30, 30, 45, 0.8);
    color: #94a3b8;
    font-size: 18px;
    transition: all 0.25s ease;
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.footer-socials a img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(70%) sepia(10%) saturate(400%) hue-rotate(180deg) brightness(0.95);
    transition: filter 0.25s ease;
}

.footer-socials a:hover img {
    filter: brightness(0) saturate(100%) invert(100%);
}

.footer-socials a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.footer-socials a.twitch:hover {
    background: #9146ff;
    color: #fff;
    border-color: #9146ff;
}

.footer-socials a.youtube:hover {
    background: #ff0000;
    color: #fff;
    border-color: #ff0000;
}

.footer-socials a.tiktok:hover {
    background: linear-gradient(135deg, #25f4ee, #fe2c55);
    color: #fff;
    border-color: #fe2c55;
}

.footer-socials a.kick:hover {
    background: #53fc18;
    color: #020617;
    border-color: #53fc18;
}

.footer-socials a.twitter:hover {
    background: #1da1f2;
    color: #fff;
    border-color: #1da1f2;
}

.footer-socials a.discord:hover {
    background: #5865f2;
    color: #fff;
    border-color: #5865f2;
}

.footer-socials a.github:hover {
    background: #333;
    color: #fff;
    border-color: #555;
}

.footer-socials a.ko-fi:hover {
    background: #ff5e5b;
    color: #fff;
    border-color: #ff5e5b;
}

/* Responsive adjustments for URL container */
@media (max-width: 768px) {
    .url-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .url-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .generate-button, .copy-button {
        justify-content: center;
    }
}
