:root {
    --primary: #F94F51;
    --primary-hover: #e04547;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #cbd5e1;
    --error: #ef4444;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --red-200: #fecaca;
}

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.5;
    display: flex;
    justify-content: center;
    padding: 2rem;
    min-height: 100vh;
}

.container {
    background: var(--card-bg);
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--slate-100);
    width: 100%;
    max-width: 900px;
    padding: 3rem;
}

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

h1 {
    font-size: 2.25rem;
    color: var(--text-main);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

header p {
    color: var(--slate-600);
    font-size: 1.125rem;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
    width: 100%;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-700);
    margin-bottom: 0.5rem;
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--slate-300);
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 1rem;
    background: white;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(249, 79, 81, 0.2);
}

button[type="submit"] {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 9999px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 10px 15px -3px var(--red-200);
}

button[type="submit"]:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

button[type="submit"]:active {
    transform: translateY(0);
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

button.loading .btn-text {
    display: none;
}
button.loading .spinner {
    display: block;
}

.results-panel {
    background: var(--slate-50);
    border-radius: 1rem;
    border: 2px dashed var(--slate-300);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    min-height: 350px;
}

.placeholder-state {
    color: var(--slate-600);
    font-size: 1.1rem;
}

.coupon-display {
    display: none;
    width: 100%;
}

.coupon-display h2 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--slate-800);
    font-weight: bold;
}

.coupon-display img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px var(--slate-300);
    margin-bottom: 1.5rem;
    display: block;
}

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

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: #10b981;
    color: white;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.4);
}

.btn-secondary:hover {
    background: #059669;
}

.btn-outline {
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--slate-700);
    border: 1px solid var(--slate-200);
    border-radius: 9999px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--slate-50);
}

.error-state {
    display: none;
    color: var(--error);
    margin-top: 1rem;
    padding: 1rem;
    background: #fef2f2;
    border-radius: 0.5rem;
    border: 1px solid #fca5a5;
    width: 100%;
}

.color-pickers {
    display: flex;
    gap: 1.5rem;
}

.color-pickers .form-group {
    flex: 1;
}

input[type="color"] {
    width: 100%;
    padding: 0.25rem;
    height: 3rem;
    cursor: pointer;
    border-radius: 0.5rem;
    border: 1px solid var(--slate-300);
}

.checkbox-group {
    margin-top: 0.5rem;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-start !important;
    text-align: left;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

label.checkbox-label {
    display: inline;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 50;
    border-bottom: 1px solid var(--slate-200);
}
.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5rem;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 2rem;
}
.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
}
.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
}
.logo-text {
    font-weight: bold;
    font-size: 1.5rem;
    letter-spacing: -0.025em;
    color: var(--slate-900);
}
.desktop-menu { 
    display: flex; 
    gap: 2rem; 
    align-items: center; 
}
.nav-link {
    color: var(--slate-600);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.nav-link:hover { color: var(--primary); }

.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.2s;
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: #d1fae5;
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.modal-icon svg {
    width: 2rem;
    height: 2rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 0.75rem;
}

.modal-text {
    color: var(--slate-600);
    line-height: 1.5;
    font-size: 0.95rem;
}
