/* Reset ve temel stiller */
* {
    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, #ec1b24 0%, #e2888c 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Ana içerik */
main {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* İki panel layout */
.main-layout {
    display: flex;
    gap: 2rem;
    min-height: 600px;
}

.left-panel {
    flex: 1;
    overflow-y: auto;
    padding-right: 1rem;
}

.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.right-panel .result-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    min-height: 400px;
}

.placeholder-content {
    text-align: center;
    color: #6c757d;
}

.placeholder-content h3 {
    margin-bottom: 1rem;
    color: #495057;
}

.result-content {
    width: 100%;
    text-align: center;
}

/* Form stilleri */
.vcard-form {
    max-width: 100%;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    color: #4a5568;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.form-section h2::before {
    content: '';
    width: 3px;
    height: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    margin-right: 8px;
    border-radius: 2px;
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    min-height: 60px;
}

/* Hata mesajları */
.error-message {
    display: none;
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.2rem;
}

/* Butonlar */
.form-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    flex: 1;
    min-width: 200px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

/* Loading durumu */
.btn-loading {
    display: none;
}

.btn-primary:disabled .btn-text {
    display: none;
}

.btn-primary:disabled .btn-loading {
    display: inline;
}

/* Sonuç bölümü */
.result-section {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 2rem;
}

.result-section h2 {
    color: #2d3748;
    margin-bottom: 1.5rem;
}

.qr-container {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.qr-container img {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* vCard Debug Bölümü */
.vcard-debug {
    margin: 2rem 0;
    text-align: left;
}

.vcard-debug h3 {
    color: #4a5568;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.2rem;
}

.vcard-debug pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #cbd5e0;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 2rem;
    color: white;
    opacity: 0.8;
}

/* Responsive tasarım */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
        gap: 1.5rem;
    }

    .left-panel {
        max-height: none;
        padding-right: 0;
    }

    .right-panel .result-section {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    main {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .result-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    main {
        padding: 1rem;
    }

    .form-section h2 {
        font-size: 1.2rem;
    }
}

/* Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-section {
    animation: fadeIn 0.5s ease-out;
}

/* Zorunlu alan işaretleri */
label:has(+ input[required])::after,
label:has(+ textarea[required])::after {
    content: ' *';
    color: #e53e3e;
}

/* Form geçişleri */
.form-group {
    animation: fadeIn 0.3s ease-out;
}

/* Hover efektleri */
.form-group:hover input,
.form-group:hover textarea {
    border-color: #cbd5e0;
}

/* Başarı durumu */
.success-message {
    background: #c6f6d5;
    color: #22543d;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #38a169;
}