:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --whatsapp: #25D366;
    --bg: #f8fafc;
    --text: #334155;
    --text-light: #64748b;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.container {
    background: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.05);
    max-width: 1000px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
}

/* --- Navigation & Header --- */
.home-link {
    display: inline-block;
    text-decoration: none;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.home-link:hover {
    color: var(--primary);
}

h2 { 
    color: var(--text); 
    margin-top: 0; 
    margin-bottom: 25px;
}

/* --- Input Styling --- */
.input-group { margin-bottom: 20px; }
.input-row { display: flex; gap: 20px; }
.input-row .input-group { flex: 1; }

label { 
    font-size: 13px; 
    font-weight: 700; 
    color: #64748b; 
    margin-bottom: 8px; 
    display: block; 
}

input[type="text"], select {
    width: 100%; 
    padding: 12px; 
    border: 2px solid #f1f5f9; 
    border-radius: 12px; 
    outline: none;
    font-family: inherit; 
    transition: border-color 0.3s;
}

input:focus, select:focus { border-color: var(--primary); }
.color-input { height: 45px; padding: 5px; cursor: pointer; }

/* --- Export Section --- */
.export-section { 
    margin-top: 30px; 
    padding-top: 20px; 
    border-top: 2px solid #f8fafc; 
}

.download-group { 
    display: flex; 
    gap: 12px; 
    margin-bottom: 12px; 
    width: 100%;
}

#export-format { 
    flex: 1; 
    min-width: 120px; /* Dropdown visibility fix */
}

.btn {
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.download-btn { 
    flex: 2; 
    background: var(--primary); 
    color: white; 
}

.download-btn:hover { 
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.whatsapp-btn { 
    background: var(--whatsapp); 
    color: white; 
    padding: 12px; 
    width: 100%; 
}

.whatsapp-btn:hover { 
    opacity: 0.9;
    transform: translateY(-1px);
}

/* --- Footer Credit --- */
.footer-credit { 
    margin-top: 30px; 
    text-align: center; 
    font-size: 13px; 
    color: #94a3b8; 
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.footer-credit a { 
    color: var(--primary); 
    font-weight: 800; 
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer-credit a:hover { 
    text-decoration: underline;
}

/* --- Preview Area --- */
.preview-area { 
    background: #f1f5f9; 
    border-radius: 24px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    padding: 30px; 
}

#qr-poster { 
    background: white; 
    padding: 25px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    transition: transform 0.3s ease;
}

#qr-poster:hover {
    transform: scale(1.02);
}

#qr-label { 
    margin-top: 15px; 
    font-size: 24px; 
    font-weight: 800; 
    color: var(--text); 
}

.status-text { 
    color: #94a3b8; 
    margin-top: 15px; 
    font-size: 13px; 
}

/* --- Frame Designs --- */
.frame-simple { border: 5px solid #334155; border-radius: 12px; }
.frame-modern { border-radius: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.frame-elegant { border: 8px double #d4af37; background: #fffdf5; }

/* New Custom Designs */
.frame-neon {
    border: 3px solid var(--primary);
    border-radius: 15px;
    box-shadow: 0 0 15px var(--primary), inset 0 0 5px var(--primary);
    background: #fff;
}

.frame-thick-soft {
    border: 12px solid #f1f5f9;
    border-radius: 40px;
    background: white;
}

.frame-astrology {
    border: 4px solid #1e1b4b; /* Deep Navy */
    outline: 2px solid #d4af37; /* Gold Outline */
    outline-offset: -10px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
    padding: 40px !important;
}

/* --- Responsive Layout --- */
@media (max-width: 850px) { 
    .container { grid-template-columns: 1fr; } 
    #qr-poster { padding: 15px; }
}