:root {
    --primary: #00b06f;
    --primary-dark: #008f58;
    --bg-dark: #1a1a2e;
    --bg-card: #16213e;
    --bg-hover: #1f3460;
    --text: #ffffff;
    --text-muted: #a0a0b0;
    --border: #2a3f5f;
    --roblox-yellow: #e6b800;
    --roblox-green: #00b06f;
    --roblox-red: #da2c2c;
}

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

body {
    font-family: 'Fredoka', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    background-image: 
        radial-gradient(ellipse at 20% 20%, rgba(0, 176, 111, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(230, 184, 0, 0.1) 0%, transparent 50%);
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--roblox-yellow), var(--roblox-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Upload Section */
.upload-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px dashed var(--border);
    transition: all 0.3s ease;
}

.upload-section.drag-over {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.upload-area {
    text-align: center;
    padding: 2rem 1rem;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-area p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.upload-area span {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: block;
    margin: 0.5rem 0;
}

/* Preview */
.preview-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
}

.preview-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.preview-section img {
    display: block;
    max-width: 100%;
    max-height: 250px;
    border-radius: 12px;
    border: 3px solid var(--primary);
}

.btn-remove {
    position: absolute;
    top: -10px;
    right: calc(50% - 100px);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--roblox-red);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-remove:hover {
    transform: scale(1.1);
}

/* Buttons */
.btn-upload, .btn-generate, .btn-download, .btn-share {
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-upload {
    background: var(--primary);
    color: white;
    padding: 0.8rem 2rem;
    margin-top: 1rem;
}

.btn-upload:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-generate {
    background: linear-gradient(135deg, var(--roblox-yellow), var(--roblox-green));
    color: white;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 176, 111, 0.3);
}

.btn-generate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 176, 111, 0.4);
}

.btn-generate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Result Section */
.result-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-section h2 {
    margin-bottom: 1rem;
    color: var(--roblox-yellow);
}

.result-container img {
    max-width: 100%;
    border-radius: 12px;
    border: 3px solid var(--roblox-yellow);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-download, .btn-share {
    padding: 0.8rem 1.5rem;
    background: var(--bg-hover);
    color: white;
    border: 2px solid var(--border);
}

.btn-download:hover, .btn-share:hover {
    border-color: var(--primary);
    background: var(--primary);
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error */
.error-message {
    background: rgba(218, 44, 44, 0.2);
    border: 1px solid var(--roblox-red);
    color: #ff6b6b;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}