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

:root {
    --primary-color: #e91e63;
    --primary-dark: #c2185b;
    --secondary-color: #333;
    --light-color: #f4f4f4;
    --success-color: #28a745;
    --error-color: #dc3545;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    width: 100px;
    height: auto;
}

h1 {
    color: var(--primary-color);
    font-weight: 500;
}

/* Main Content */
main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

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

/* Form Styles */
.form-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 30px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="text"],
input[type="number"],
input[type="date"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--primary-color);
    outline: none;
}

select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    background-color: #fff;
    color: #333;
    transition: border-color 0.3s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    box-shadow: none;
}
select:focus {
    border-color: var(--primary-color);
}
select:disabled {
    background-color: #f4f4f4;
    color: #aaa;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

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

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

.secondary {
    background-color: #f1f1f1;
    color: var(--secondary-color);
}

.secondary:hover {
    background-color: #e1e1e1;
}

/* Preview Styles */
.preview-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 30px;
    display: flex;
    flex-direction: column;
}

h2 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-weight: 500;
}

.certificate-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px;
    border: 1px dashed var(--border-color);
    border-radius: 4px;
    min-height: 400px;
    position: relative;
}

.certificate-preview p {
    color: #777;
}

.certificate-iframe {
    width: 100%;
    height: 500px;
    border: none;
    box-shadow: var(--shadow);
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #777;
    font-style: italic;
}

.loading::after {
    content: "";
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid #ddd;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    color: var(--error-color);
    padding: 10px;
}

.hidden {
    display: none;
}

#previewImage img {
    max-width: 100%;
    height: auto;
    box-shadow: var(--shadow);
}

/* Footer Styles */
footer {
    margin-top: 40px;
    text-align: center;
    color: #777;
    font-size: 14px;
}

.footer-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-link {
    color: #999;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-note {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

/* Message Styles */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
    box-shadow: var(--shadow);
    position: relative;
    animation: slideIn 0.3s ease-out;
}

.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success-color);
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--error-color);
}

.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.5s;
}

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