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

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #10b981;
    --error: #ef4444;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    padding: 80px 20px 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    margin-bottom: 40px;
}

.signature-counter {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 40px;
    border-radius: 16px;
    margin-top: 20px;
}

.counter-icon {
    font-size: 2rem;
}

.counter-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.counter-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.counter-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Container */
.container {
    max-width: 1100px;
    margin: -60px auto 0;
    padding: 0 20px 60px;
    position: relative;
    z-index: 2;
}

main {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-light);
}

.section-icon {
    font-size: 1.5rem;
}

.section-header {
    justify-content: space-between;
    flex-wrap: wrap;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.signatures-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.action-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.action-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.action-btn.secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
}

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

/* Cards */
.petition-text-card,
.form-card,
.signatures-card {
    background: var(--bg-primary);
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.petition-text-card:hover,
.form-card:hover,
.signatures-card:hover {
    box-shadow: var(--shadow-lg);
}

/* Petition Text Section */
.petition-text {
    font-size: 1.125rem;
    line-height: 2;
    color: var(--text-secondary);
}

.petition-text p {
    margin-bottom: 24px;
}

.petition-text p:last-of-type {
    margin-bottom: 32px;
}

.petition-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.petition-signature {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid var(--border-light);
    text-align: left;
}

.petition-signature p {
    margin-bottom: 8px;
    font-size: 1.125rem;
}

.petition-signature p:last-child {
    margin-top: 12px;
    font-size: 1.25rem;
}

/* Form Section */
.signature-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.required {
    color: var(--error);
    font-size: 1.2em;
}

.form-group input {
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-group input:hover {
    border-color: var(--accent);
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-group input::placeholder {
    color: var(--text-light);
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
    border: none;
    padding: 18px 32px;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    margin-top: 8px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
}

.submit-btn:active {
    transform: translateY(0);
}

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

.btn-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.submit-btn:hover .btn-icon {
    transform: translateX(-4px);
}

/* Message */
.message {
    margin-top: 24px;
    padding: 16px 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    display: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid var(--success);
    display: block;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid var(--error);
    display: block;
}

/* Signatures Section */
.signatures-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid var(--accent);
    background: var(--accent);
    color: white;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn.secondary {
    background: white;
    color: var(--accent);
    border-color: var(--accent);
}

.action-btn.secondary:hover {
    background: var(--bg-secondary);
    color: var(--accent-hover);
    border-color: var(--accent-hover);
}

.signatures-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.signature-item {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 16px;
    border: 2px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.signature-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.signature-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    background: white;
}

.signature-item:hover::before {
    transform: scaleY(1);
}

.signature-name {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.signature-license {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-family: 'Courier New', monospace;
    background: var(--bg-tertiary);
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 1.125rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.empty-state {
    text-align: center;
    color: var(--text-light);
    padding: 60px 20px;
    font-size: 1.125rem;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 60px;
    padding: 40px 20px;
    color: var(--text-secondary);
}

footer p {
    margin-bottom: 8px;
    font-size: 1rem;
    font-weight: 500;
}

.footer-subtitle {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 20px 80px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .counter-number {
        font-size: 2rem;
    }

    .container {
        margin-top: -50px;
        padding: 0 16px 40px;
    }

    .petition-text-card,
    .form-card,
    .signatures-card {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .signatures-list {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .petition-text {
        font-size: 1rem;
        line-height: 1.8;
    }
    
    .signatures-actions {
        width: 100%;
        margin-top: 16px;
        justify-content: flex-start;
    }
    
    .action-btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .signature-counter {
        flex-direction: column;
        padding: 20px 30px;
    }

    .counter-content {
        align-items: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.petition-text-card,
.form-card,
.signatures-card {
    animation: fadeInUp 0.6s ease-out;
}

.signatures-card {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

/* Print Styles */
@media print {
    .counter-icon {
        font-size: 1.2rem !important;
    }
    
    .section-icon {
        font-size: 1rem !important;
    }
    
    .badge {
        font-size: 0.75rem !important;
    }
    
    /* کاهش اندازه کلی برای چاپ */
    body {
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .counter-number {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
}
