/* CSS will go here */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --card-width: 350px;
    --card-height: 220px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f2f5;
    color: var(--dark-color);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.subtitle {
    color: #666;
    font-weight: 300;
}

.app-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.form-section {
    flex: 1;
    min-width: 300px;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.preview-section {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

input, select, textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: all 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.color-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: var(--dark-color);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
}

.btn-warning:hover {
    background-color: #d91a6d;
}

.card-container {
    width: var(--card-width);
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    display: flex;
    flex-direction: column;
    padding-bottom: 50px;
}

.card-header {
    height: 70px;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card-photo {
    width: 30%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder i {
    font-size: 30px;
    color: #999;
}

.card-details {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-details p {
    margin: 3px 0;
    font-size: 12px;
}

.card-details .name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.card-details .company {
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

.card-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: #666;
    border-top: 1px solid #eee;
}

.card-logo {
    max-height: 20px;
    max-width: 80px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.qr-code {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    background-color: white;
    padding: 3px;
    border-radius: 5px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

.qr-code img {
    width: 100%;
    height: 100%;
}

.signature {
    position: absolute;
    bottom: 15px;
    right: 130px;
    width: 80px;
    height: 30px;
    border-top: 1px solid #333;
    text-align: center;
    font-size: 10px;
}

.template-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.template {
    width: 60px;
    height: 40px;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    overflow: hidden;
    position: relative;
}

.template:hover {
    transform: scale(1.05);
}

.template.selected {
    border-color: var(--primary-color);
}

.template .template-header {
    height: 30%;
    width: 100%;
}

.template .template-body {
    height: 70%;
    width: 100%;
    background-color: white;
    position: relative;
}

.template .template-photo {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #eee;
    top: 10px;
    left: 10px;
}

.template-1 .template-header {
    background-color: #4361ee;
}

.template-2 .template-header {
    background: linear-gradient(45deg, #4361ee, #3a0ca3);
}

.template-3 .template-header {
    background-color: #3f37c9;
}

.template-4 .template-header {
    background: linear-gradient(45deg, #4895ef, #4361ee);
}

.template-5 .template-header {
    background-color: #4cc9f0;
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .form-section, .preview-section {
        width: 100%;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}