/* Ultimate Shoutout Customizer Styles */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Poppins:wght@300;400;500;600&family=Orbitron:wght@400;600;700&display=swap');

:root {
    --primary-color: #9146FF;
    --secondary-color: #772CE8;
    --accent-color: #BF94FF;
    --icon-color: #9146FF;
    --background-dark: #121212;
    --background-darker: #0a0a0a;
    --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), #120a1a);
    color: var(--text-light);
    min-height: 100vh;
    padding: 20px;
    padding-bottom: 80px;
}

.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;
    max-width: 100%;
    height: auto;
    display: block;
}

.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;
    font-family: 'Orbitron', sans-serif;
    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;
    font-family: 'Orbitron', sans-serif;
    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;
}

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

.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 {
    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-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;
}

.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: rgba(145, 70, 255, 0.08);
    border: 1px solid rgba(145, 70, 255, 0.18);
    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 h2 {
    font-size: 1.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin: 0;
}

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

.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: #fbbf24;
    animation: pulse-dot 1s infinite;
}

.panel-header-actions .connection-indicator.connected .status-dot {
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
}

.panel-header-actions .connection-indicator.disconnected .status-dot {
    background: #f87171;
}

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

.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-group {
    margin-bottom: 20px;
    position: relative;
}

.setting-group::after {
    content: "";
    position: absolute;
    inset: -9px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(145, 70, 255, 0.15);
    box-shadow: 0 0 18px rgba(145, 70, 255, 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(145, 70, 255, 0.35);
}

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

.setting-hint {
    font-size: 11px;
    color: #888;
    margin: 4px 0 0 0;
}

.setting-warning {
    font-size: 11px;
    color: var(--warning-color);
    margin: 8px 0 0 0;
}

.text-input.input-invalid,
input[type="date"].input-invalid {
    border-color: var(--warning-color);
}

.settings-section > .setting-hint {
    margin-bottom: 18px;
}

.setting-hint a {
    color: var(--accent-color);
}

.style-select, input[type="color"], input[type="range"], input[type="date"] {
    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="color"] {
    height: 50px;
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
}

.number-input, .text-input {
    width: 100%;
    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;
}

.number-input:focus, .text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.1);
}

.inline-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.inline-row .text-input,
.inline-row .number-input {
    flex: 1;
    min-width: 0;
}

.inline-row .test-button {
    flex-shrink: 0;
}

.filter-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-row .inline-field {
    flex: 1 1 140px;
    min-width: 0;
}

.filter-row .inline-field label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 6px;
}

.filter-row .number-input,
.filter-row .text-input {
    width: 100%;
}

.refresh-button, .test-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;
}

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

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

.test-button {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(145, 70, 255, 0.3);
    white-space: nowrap;
}

.test-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(145, 70, 255, 0.4);
}

.preview-container {
    flex: 1;
    background: linear-gradient(135deg, #0a0510, #120a1a);
    border-radius: var(--border-radius);
    overflow: hidden;
    min-height: 650px;
}

#shoutout-preview {
    width: 100%;
    height: 100%;
    min-height: 650px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: transparent;
}

.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(145, 70, 255, 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), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(145, 70, 255, 0.3);
}

.generate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(145, 70, 255, 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 {
    display: flex;
    gap: 10px;
    margin-top: 0;
    flex-shrink: 0;
}

.sub-group {
    margin-left: 18px;
    padding-left: 10px;
    border-left: 2px solid rgba(145, 70, 255, 0.2);
}

.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;
}

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

.footer-branding a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer-branding a:hover {
    color: var(--accent-color);
}

.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: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.twitter:hover {
    background: #1da1f2;
    color: #fff;
    border-color: #1da1f2;
}

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

::-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: var(--secondary-color);
}

/* Streamer.bot import string copy bar */
.sb-import-string-group {
    margin-top: 4px;
}

.tool-import-string-bar {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.85rem 1.15rem;
    background: linear-gradient(180deg, rgba(40, 40, 55, 0.95) 0%, rgba(24, 24, 32, 0.98) 100%);
    border: 1px solid rgba(145, 70, 255, 0.35);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.2s ease,
        background 0.35s ease,
        color 0.3s ease,
        opacity 0.2s ease;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 2px 12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(145, 70, 255, 0.08);
    overflow: hidden;
    font: inherit;
}

.tool-import-string-bar:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.tool-import-string-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(145, 70, 255, 0.08) 35%,
        rgba(191, 148, 255, 0.12) 50%,
        rgba(145, 70, 255, 0.08) 65%,
        transparent 100%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.tool-import-string-bar:not(:disabled):hover {
    border-color: rgba(191, 148, 255, 0.55);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 4px 20px rgba(145, 70, 255, 0.25),
        0 0 24px rgba(145, 70, 255, 0.15);
    transform: translateY(-1px);
}

.tool-import-string-bar:not(:disabled):hover::before {
    transform: translateX(100%);
}

.tool-import-string-bar:not(:disabled):active {
    transform: translateY(0);
}

.tool-import-string-bar.is-copied {
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.42) 0%, rgba(22, 163, 74, 0.55) 100%);
    border-color: rgba(74, 222, 128, 0.65);
    color: #dcfce7;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 20px rgba(34, 197, 94, 0.3),
        0 0 24px rgba(34, 197, 94, 0.15);
}

.tool-import-string-bar.is-copied::before {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(134, 239, 172, 0.15) 35%,
        rgba(74, 222, 128, 0.25) 50%,
        rgba(134, 239, 172, 0.15) 65%,
        transparent 100%
    );
    transform: translateX(0);
}

.tool-import-string-text {
    position: relative;
    z-index: 1;
    width: 100%;
    font-family: 'Roboto Mono', 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-import-string-bar.is-copied .tool-import-string-text {
    text-align: center;
    font-family: inherit;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.tool-import-string-help {
    margin: 0.85rem 0 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-gray);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(30, 30, 30, 0.5);
}

@media (max-width: 1200px) {
    .container {
        flex-direction: column;
    }
    .settings-panel, .preview-panel {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    body { padding: 10px; }
    .header { flex-direction: column; align-items: stretch; }
    .url-container { flex-direction: column; align-items: stretch; }
    .url-buttons { flex-direction: column; align-items: stretch; }
    .generate-button, .copy-button { justify-content: center; }
    .panel-header {
        flex-direction: column;
        align-items: stretch;
    }
    .panel-header-main {
        flex-direction: column;
        align-items: flex-start;
    }
    .panel-header-actions {
        justify-content: flex-end;
    }
    .preview-support-note {
        border-radius: var(--border-radius);
    }
}
