:root {
    --bg-color: #000000;
    --sidebar-bg: #0a0a0a;
    --primary: #ffffff;
    --primary-hover: #ededed;
    --primary-text: #000000;
    --secondary: #1a1a1a;
    --secondary-hover: #262626;
    --success: #ffffff;
    --success-hover: #ededed;
    --success-text: #000000;
    --warning: #2563eb; /* Sophisticated Royal Blue */
    --outline: #262626;
    --text-main: #ffffff;
    --text-muted: #888888;
    --border-radius: 4px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 380px; 
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    z-index: 10;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--outline);
    overflow-y: auto;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.2rem;
    letter-spacing: -1px;
}

.pro-badge-main {
    background: var(--warning);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 1px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.control-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #a3a3a3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Preset Gallery Styles */
.bg-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 5px;
}
.preset-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
}
.preset-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    filter: grayscale(20%);
}
.preset-bg:hover {
    filter: grayscale(0%);
    border-color: var(--primary);
    transform: translateY(-2px);
}
.preset-wrapper .pro-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--warning);
    color: #fff;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 3px;
    z-index: 2;
    pointer-events: none;
}

.file-input {
    display: none;
}

.text-input, .select-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--outline);
    background: var(--bg-color);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.text-input:focus, .select-input:focus {
    border-color: var(--primary);
}

.font-controls {
    display: flex;
    gap: 0.5rem;
}

.color-picker {
    height: 100%;
    width: 60px;
    border: 1px solid var(--outline);
    border-radius: var(--border-radius);
    background: var(--bg-color);
    cursor: pointer;
    padding: 2px;
}

.btn {
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.btn-primary { 
    background: var(--primary); 
    color: var(--primary-text); 
}
.btn-primary:hover { 
    background: var(--primary-hover); 
}

.btn-secondary { 
    background: var(--secondary); 
    color: #fff;
    border: 1px solid var(--outline);
}
.btn-secondary:hover { 
    background: var(--secondary-hover); 
}

.btn-outline { 
    background: transparent; 
    border: 1px solid var(--outline); 
    color: var(--text-main);
}
.btn-outline:hover { 
    border-color: var(--primary); 
}

.btn-success { 
    background: var(--success); 
    color: var(--success-text);
    width: 100%; 
    padding: 1.2rem; 
    font-size: 1.1rem; 
    font-weight: 700;
}
.btn-success:hover { 
    background: var(--success-hover); 
}

.btn-upgrade { 
    background: var(--primary); 
    color: var(--primary-text);
    font-size: 1.1rem; 
    width: 100%; 
    padding: 1rem; 
}
.btn-upgrade:hover { 
    background: var(--primary-hover); 
}

.download-group {
    margin-top: auto;
}

.help-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.loading-text {
    font-size: 0.85rem;
    color: var(--warning);
    font-weight: 600;
    margin-top: 5px;
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Workspace */
.workspace {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(var(--outline) 1px, transparent 1px),
        linear-gradient(90deg, var(--outline) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
}

.canvas-wrapper {
    border-radius: 0;
    overflow: hidden;
    border: 1px solid var(--outline);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.05);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-color);
    border: 1px solid var(--outline);
    padding: 3rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.2s ease;
    position: relative;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-close:hover { color: #fff; }

.modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.modal-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.pricing-features {
    text-align: left;
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-left: 2rem;
}

.pricing-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: #e2e8f0;
}

.check-icon {
    color: var(--primary);
    font-weight: bold;
}

.price-tag {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    margin: 1.5rem 0;
    letter-spacing: -1px;
}
.price-tag span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0;
}
