/* Trophy Tracker Customizer Styles */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?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');

/* Base Styles */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #f72585;
    --icon-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;
    padding-bottom: 80px;
}

/* 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;
}

/* 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 - 260px);
    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);
}

/* 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"] {
    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;
}

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

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

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

/* 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 {
    margin-top: 10px;
    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);
}

/* Preview Container */
.preview-container {
    flex: 1;
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--background-darker), #1a1a2e);
    border-radius: var(--border-radius);
    overflow: hidden;
}

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

/* 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;
}

/* 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;
}

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

/* 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;
}

/* 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);
}

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

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        align-items: stretch;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header-overlay-url {
        max-width: 480px;
    }

    .url-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .url-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .generate-button, .copy-button {
        justify-content: center;
    }
    
    .alert-buttons {
        flex-direction: column;
    }
    
    .alert-button {
        width: 100%;
    }
}
