@import 'https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap';

body {
    display: flex;
    flex-direction: row; /* Sidebar left, Preview right */
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #0B0B0F;
    color: #fff;
    min-height: 100vh;
    width: 100vw;
    overflow-x: hidden;
}
/* --- Options Sidebar --- */
.options-panel {
    width: 360px;
    height: 100vh;
    position: sticky;
    top: 0;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 30px 25px;
    overflow-y: auto;
    z-index: 100;
    box-sizing: border-box;
}

/* Scrollbar Styling for Sidebar */
.options-panel::-webkit-scrollbar {
    width: 4px;
}
.options-panel::-webkit-scrollbar-thumb {
    background: rgba(192, 132, 252, 0.3);
    border-radius: 10px;
}

.options-panel h2 {
    font-size: 14px;
    letter-spacing: 3px;
    color: #C084FC;
    text-transform: uppercase;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(192, 132, 252, 0.2);
    padding-bottom: 10px;
}

/* --- Input Styling --- */
.options-panel label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
    margin-top: 20px;
    letter-spacing: 1px;
}

.options-panel input[type="text"],
.options-panel input[type="url"],
.options-panel textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.options-panel input:focus, 
.options-panel textarea:focus {
    outline: none;
    border-color: #C084FC;
    background: rgba(192, 132, 252, 0.05);
    box-shadow: 0 0 15px rgba(192, 132, 252, 0.1);
}

/* Color Picker Customization */
.options-panel input[type="color"] {
    width: 100%;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
}

/* --- Preview Workspace --- */
.preview-area {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0a0a0a;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(192, 132, 252, 0.03) 0%, transparent 60%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    position: relative;
    padding: 40px;
}

/* Hover effect on card in designer */
.card-container {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.card-container:hover {
    transform: scale(1.02);
}

/* --- Decoration Picker Grid --- */
.decoration-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 12px;
}

.decoration-item {
    aspect-ratio: 1/1;
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.decoration-item img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.decoration-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.decoration-item.selected {
    border-color: #C084FC;
    background: rgba(192, 132, 252, 0.15);
    box-shadow: 0 0 10px rgba(192, 132, 252, 0.2);
}

/* --- Buttons --- */
.customizer-button {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid #C084FC;
    background: transparent;
    color: #C084FC;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.customizer-button:hover {
    background: rgba(192, 132, 252, 0.1);
    transform: translateY(-2px);
}

.customizer-button.download {
    background: #C084FC;
    color: #000;
    border: none;
    margin-top: 40px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.customizer-button.download:hover {
    background: #d1a3ff;
    box-shadow: 0 0 20px rgba(192, 132, 252, 0.4);
}

/* --- Tags & Socials Preview --- */
.customizer-tag-list, .customizer-social-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.customizer-tag-item, .customizer-social-item {
    background: rgba(192, 132, 252, 0.1);
    border: 1px solid rgba(192, 132, 252, 0.2);
    color: #C084FC;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
}

.customizer-tag-item:hover, .customizer-social-item:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

    /* --- Avatar Section Layout --- */
.upload-container {
    margin: 15px 0;
    text-align: center;
}

/* The "OR" separator line */
.separator-text {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    line-height: 0.1em;
    margin: 20px 0;
}

.separator-text span {
    background: #0f0f0f; /* Match your sidebar background color */
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Hide the actual ugly file input */
#optAvatarFile {
    display: none;
}

/* Style the label as the professional button */
.custom-file-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(192, 132, 252, 0.05);
    color: #C084FC;
    border: 1px solid rgba(192, 132, 252, 0.2);
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-file-upload:hover {
    background: rgba(192, 132, 252, 0.15);
    border-color: #C084FC;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(192, 132, 252, 0.1);
}

.custom-file-upload:active {
    transform: translateY(0);
    background: rgba(192, 132, 252, 0.25);
}

.upload-btn-img {
    width: 40px;  /* Adjust size to match your font height */
    height: 40px;
    object-fit: contain;
    pointer-events: none; /* Prevents the image from interfering with the label click */
    
    /* Optional: If your icon is black/white and you want it to match the purple text */
    /* filter: brightness(0) saturate(100%) invert(67%) sepia(87%) saturate(452%) hue-rotate(216deg) brightness(101%) contrast(98%); */
}

/* DISCORD */
.import-container {
    margin-bottom: 20px;
    width: 100%;
}

.discord-import-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    background-color: #5865F2; /* Official Discord Blue */
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.2);
}

.discord-import-btn:hover {
    background-color: #4752C4; /* Darker Discord Blue */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

.discord-import-btn:active {
    transform: translateY(0) scale(0.98);
}


/* Optional: Add a subtle 'verified' glow */
.discord-import-btn::after {
    content: '󰄬'; /* Using a nerd font icon or emoji for 'check' */
    font-size: 10px;
    opacity: 0.5;
}

/* Container Spacing */
.import-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

/* Base Button Styling (Shared) */
.discord-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.main-connect {
    background-color: #5865F2;
    color: white;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.2);
}

.main-connect:hover {
    background-color: #4752C4;
    transform: translateY(-2px);
}

/* Sub-Options Container */
.discord-sub-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
}

/* Locked State Styling */
.discord-sub-options.locked {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(1);
}

.sub-btn {
    background-color: #2c2f33; /* Dark Discord Grey */
    color: #ffffff;
    font-size: 13px;
}

/* Simple Toggle Styling */
.discord-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #ccc;
}

/* Visual cue for success */
.main-connect.connected {
    background-color: #43b581;
}

/* Container for the row of buttons */


/* Make toggles look like buttons */
.toggle-button {
    flex: 1; /* Each takes half the width */
    font-size: 12px;
    padding: 10px;
    position: relative;
    justify-content: space-between; /* Text on left, indicator on right */
    cursor: pointer;
    background-color: #2c2f33;
    transition: background 0.2s ease;
}

/* Hover effect for the 'button' toggles */
.toggle-button:hover {
    background-color: #3a3e44;
}

/* A small circular indicator to show if it's ON or OFF */
.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #f04747; /* Default Red (Off) */
    transition: all 0.2s ease;
    box-shadow: 0 0 5px rgba(240, 71, 71, 0.3);
}

/* When the hidden checkbox is checked, change the button and indicator */
.toggle-button:has(input:checked) {
    background-color: #35393e;
    border: 1px solid rgba(67, 181, 129, 0.3);
}

.toggle-button:has(input:checked) .indicator {
    background-color: #43b581; /* Green (On) */
    box-shadow: 0 0 8px rgba(67, 181, 129, 0.6);
}

/* Ensure the main sub-btn (Import) stays full width */
.sub-btn:not(.toggle-button) {
    width: 100%;
}

/* CONNECTION BUTTON BASE STYLE */
.connection-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.connection-btn.connected {
    opacity: 0.4;
}

.connection-btn.connected:hover {
    background-color: #f25858;
}

.connection-btn:hover {
    transform: scale(1.02);
}

.connection-btn:active {
    transform: scale(0.98);
}

.connection-btn.discord {
    background-color: #5865F2;
    color: white;
}

.connection-btn.steam {
    background-color: #1b2838;
    color: white;
}

.connection-btn.spotify {
    background-color: #1db954;
    color: #191414;
}

.connection-btn.sub-btn {
    background-color: #2c2f33;
    color: #ffffff;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sub-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 7px;
    transition: all 0.3s ease;
}

.sub-options.locked {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(1);
}

.toggle-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.connection-btn .icon {
    width: 20px;
    height: 20px;
}






/* HEADER STYLE */
.section-header {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.2s;
    border-radius: 8px;
}

.section-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.header-main {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #eee;
}

.header-icon {
    width: 16px;
    opacity: 0.7;
}

/* THE MAGIC SLIDE */
.section-content {
    display: grid;
    grid-template-rows: 0fr; /* Closed by default in logic */
    transition: grid-template-rows 0.3s ease-out;
    margin-top: 10px;
}

.section-content-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.collapsible-section.open .section-content {
    grid-template-rows: 1fr; /* Opens smoothly */
}

/* Inner padding container to prevent text jumping */
.section-content > div {
    overflow: hidden;
    padding: 0px 15px;
}

/* CHEVRON ICON (CSS Only) */
.chevron-icon {
    border: solid #666;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg); /* Down */
    transition: transform 0.3s;
}

.collapsible-section.open .chevron-icon {
    transform: rotate(-135deg); /* Up */
}
/* --- Mobile Responsiveness --- */
@media (max-width: 1000px) {
    body {
        flex-direction: column;
    }
    
    .options-panel {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .preview-area {
        min-height: 400px;
        position: sticky;
        top: 0;
        z-index: 50;
        background-color: #080808;
        padding: 20px;
    }

    .card {
        transform: scale(0.85);
    }
}