:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --accent: #3182ce;
    --bg: #f7fafc;
    --card-bg: #ffffff;
    --text: #2d3748;
    --text-light: #718096;
    --border: #e2e8f0;
    --success: #38a169;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

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

.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.card-header .icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.card-header h2 {
    font-size: 1.25rem;
    color: var(--primary);
}

.party-info {
    background: #edf2f7;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.party-info h3 {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.party-info p {
    color: var(--text);
    font-weight: 500;
}

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

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
}

label .required {
    color: #e53e3e;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary-light) 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.instructions {
    background: #fffaf0;
    border: 1px solid #f6ad55;
    border-radius: 8px;
    padding: 1.25rem;
}

.instructions h3 {
    color: #c05621;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instructions ol {
    margin-left: 1.25rem;
    color: #744210;
}

.instructions li {
    margin-bottom: 0.5rem;
}

.instructions a {
    color: var(--accent);
    text-decoration: none;
}

.instructions a:hover {
    text-decoration: underline;
}

.preview-content {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.8;
}

.preview-content h4 {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.preview-content h5 {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.preview-content .section {
    margin-bottom: 1rem;
}

.preview-content .section-title {
    font-weight: 600;
    color: var(--primary);
}

.hidden {
    display: none;
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

.success-message {
    background: #c6f6d5;
    border: 1px solid var(--success);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #22543d;
}

.success-message.hidden {
    display: none;
}
