:root {
    --primary-glow: #FF2E63;
    --secondary-glow: #FF9A00;
    --bg-dark: #1A1A2E;
    --bg-card: rgba(37, 42, 52, 0.7);
    --text-main: #EAEAEA;
    --text-dim: #94A3B8;
    --accent: #08D9D6;
    --error: #FF4C29;
    --success: #33CC66;
    --border: rgba(255, 46, 99, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at 10% 20%, rgba(255, 46, 99, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 154, 0, 0.05) 0%, transparent 40%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Typography */
h1 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    background: linear-gradient(to right, var(--primary-glow), var(--secondary-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(255, 46, 99, 0.3));
}

.subtitle {
    text-align: center;
    color: var(--text-dim);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* Main Tool Section */
.glass-container {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Upload Box */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 20px;
    padding: 50px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.02);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary-glow);
    background: rgba(255, 46, 99, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 46, 99, 0.1);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.upload-zone h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.upload-zone p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Controls Header */
.tool-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary-glow);
    font-weight: 600;
}

select,
input[type="range"] {
    background: #0F172A;
    border: 1px solid var(--border);
    color: white;
    padding: 10px;
    border-radius: 8px;
    outline: none;
}

/* Preview Section */
.preview-stage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

.preview-box {
    background: #0F172A;
    border-radius: 16px;
    padding: 20px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-label {
    align-self: flex-start;
    font-size: 0.75rem;
    margin-bottom: 15px;
    color: var(--text-dim);
    text-transform: uppercase;
}

.canvas-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

canvas,
svg {
    max-width: 100%;
    max-height: 400px;
    border-radius: 4px;
}

/* Actions */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
}

.btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow));
    color: white;
    box-shadow: 0 10px 20px rgba(255, 46, 99, 0.2);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(255, 46, 99, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-glow);
    color: var(--primary-glow);
}

.btn-outline:hover {
    background: var(--primary-glow);
    color: white;
}

/* Code Editor */
.code-section {
    margin-top: 40px;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

textarea#svg-code {
    width: 100%;
    height: 150px;
    background: #020617;
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    resize: vertical;
}

/* Information Sections */
.info-section {
    margin-top: 80px;
    display: grid;
    gap: 40px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.info-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-card h3 {
    color: var(--secondary-glow);
    margin-bottom: 15px;
}

/* FAQ */
.faq-item {
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.faq-answer {
    padding: 0 20px 20px;
    color: var(--text-dim);
    display: none;
}

/* Footer */
footer {
    margin-top: 80px;
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .preview-stage {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Toast Container */
#toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.toast {
    background: white;
    color: black;
    padding: 15px 25px;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}