:root {
    --bg-color: #0d0d12;
    --card-bg: rgba(255, 255, 255, 0.05);
    --accent-color: #d4af37;
    /* Gold */
    --accent-glow: rgba(212, 175, 55, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Glassmorphism utility */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

header {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(to bottom, rgba(13, 13, 18, 0.8), transparent);
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(45deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

@media (max-width: 900px) {
    main {
        grid-template-columns: 1fr;
    }
}

/* Upload Section */
.upload-container {
    height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px dashed var(--glass-border);
}

.upload-container:hover {
    border-color: var(--accent-color);
    background: rgba(212, 175, 55, 0.05);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

#image-preview {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    display: none;
    object-fit: contain;
}

/* Sidebar / Style Selection */
.sidebar {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.style-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.style-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.style-item.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
    background: rgba(212, 175, 55, 0.1);
}

.style-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.style-icon {
    font-size: 3rem;
    line-height: 1;
    filter: grayscale(0.3);
    transition: all 0.3s ease;
}

.style-item:hover .style-icon {
    filter: grayscale(0);
    transform: scale(1.1);
}

.style-item.active .style-icon {
    filter: grayscale(0);
}

.style-name {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    padding: 0;
    background: transparent;
    font-size: 0.85rem;
    text-align: center;
    font-weight: 500;
}

.btn-generate {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    background: linear-gradient(45deg, var(--accent-color), #f3e5ab);
    color: #000;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 1rem;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.4);
}

.btn-generate:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading overlay */
#loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 13, 18, 0.9);
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #fff;
    border-bottom-color: var(--accent-color);
    border-radius: 50%;
    animation: rotation 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}