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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(90deg, #2c3e50 0%, #4a6491 100%);
    color: white;
    padding: 30px 40px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main Content */
.main-content {
    padding: 30px 40px;
}

.intro {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 5px solid #4a6491;
}

.intro h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* App Layout */
.app-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 1100px) {
    .app-container {
        grid-template-columns: 1fr;
    }
}

/* Form Styles */
.form-section, .preview-section {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-section h3, .preview-section h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eaeaea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 16px;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #4a6491;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 100, 145, 0.2);
}

/* Buttons */
.btn-generate {
    background: linear-gradient(90deg, #2c3e50 0%, #4a6491 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.1);
}

.btn-download, .btn-print {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    font-size: 16px;
}

.btn-download {
    background-color: #28a745;
    color: white;
}

.btn-download:hover {
    background-color: #218838;
}

.btn-print {
    background-color: #17a2b8;
    color: white;
}

.btn-print:hover {
    background-color: #138496;
}

.btn-download:disabled, .btn-print:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Preview Section */
.preview-container {
    border: 1px solid #ddd;
    border-radius: 6px;
    height: 500px;
    margin-bottom: 20px;
    overflow: hidden;
    background-color: white;
}

#previewFrame {
    width: 100%;
    height: 100%;
    border: none;
}

.preview-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.country-info {
    background-color: #e8f4fd;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #17a2b8;
}

.country-info h4 {
    color: #138496;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Templates Section */
.templates-section {
    margin-top: 50px;
}

.templates-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.template-card {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-top: 4px solid #4a6491;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.template-flag {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.template-card h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.template-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 25px 40px;
    text-align: center;
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: #c3cfe2;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .app-container {
        padding: 15px;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
}
