:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Glassmorphism Sidebar */
.sidebar {
    width: 400px;
    height: 100vh;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 2rem;
    overflow-y: auto;
    z-index: 10;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

/* Main Preview Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
}

.main-content::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--glass-border) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.2;
}

.preview-container {
    background: white;
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.preview-container:hover {
    transform: scale(1.02);
}

/* Controls Styling */
h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.counter-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.counter-badge span {
    margin-right: 0.4rem;
    background: var(--primary);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.sidebar-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 2rem;
}

.control-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

input[type="text"],
select,
input[type="number"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: white;
    outline: none;
    transition: all 0.2s;
}

input[type="text"]:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.color-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem;
}

input[type="color"] {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    width: 32px;
    height: 32px;
    background: none;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch {
    border-radius: 6px;
    border: none;
}

.actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

button {
    flex: 1;
    padding: 0.75rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--glass);
    color: white;
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.usage-ideas {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.usage-ideas h3 {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    font-weight: 600;
}

.usage-ideas ul {
    list-style: none;
    padding: 0;
}

.usage-ideas li {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.4;
}

.usage-ideas li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.footer-guarantee {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
}

.backups-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.backups-section h3 {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.backups-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.backup-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.backup-item:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.backup-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.backup-info strong {
    font-size: 0.85rem;
    color: var(--text-main);
    word-break: break-all;
}

.backup-info span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.backup-actions {
    display: flex;
    gap: 0.5rem;
}

.backup-actions button {
    flex: none;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
}

.backup-actions button:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.backup-actions button.delete:hover {
    background: #ef4444;
    border-color: #ef4444;
}

.no-backups {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

.footer-guarantee p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

.footer-guarantee strong {
    color: var(--accent);
}

/* Image Upload Styling */
.upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.logo-preview {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    display: none;
}