:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --primary-color: #ef402a; /* Changes dynamically via JS later if needed for UI, but default Nippon */
    --primary-hover: #d93824;
    --focus-ring: rgba(239, 64, 42, 0.25);
    --success: #10b981;
}

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

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

.container {
    max-width: 1100px;
    margin: 0 auto;
}

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

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #0f172a;
    letter-spacing: -0.02em;
}

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

.main-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Form Styling */
.form-section {
    flex: 1;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group.half {
    flex: 1;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #334155;
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    background-color: #fff;
    transition: all 0.2s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

input::placeholder {
    color: #cbd5e1;
}

.primary-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s;
}

.primary-btn:hover {
    background-color: var(--primary-hover);
}

.primary-btn:active {
    transform: translateY(1px);
}

.success-msg {
    display: block;
    margin-top: 0.5rem;
    color: var(--success);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.success-msg.show {
    opacity: 1;
}

/* Preview Section */
.preview-section {
    flex: 1.2;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 2rem;
}

.preview-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #334155;
}

.preview-card {
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    background-color: #f8fafc;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
}

.help-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
    }
    
    .form-section, .preview-section {
        width: 100%;
    }
    
    .preview-section {
        position: static;
    }
}
