:root {
    --primary: #4f46e5;
    --success: #10b981;
    --info: #0ea5e9;
    --word: #2b579a;
    --bg: #f8fafc;
    --text: #1e293b;
}

/* Genel Reset */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg);
    margin: 0; padding: 10px;
    display: flex; flex-direction: column; align-items: center;
}

.app-container { max-width: 850px; width: 100%; }

header h1 { color: var(--primary); font-size: 1.8rem; font-weight: 700; text-align: center; margin-bottom: 5px; }
.header-actions { text-align: center; margin-bottom: 20px; display: flex; flex-direction: column; align-items: center; gap: 5px; }

.card { 
    background: white; 
    padding: 20px; 
    border-radius: 20px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.05); 
    width: 100%;
}

/* Form Yerleşimi - Mobilde Tek Sütun */
.input-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
}

@media (max-width: 600px) {
    .input-grid { grid-template-columns: 1fr; }
    header h1 { font-size: 1.5rem; }
}

.input-group { display: flex; flex-direction: column; gap: 5px; }
.full { grid-column: 1 / -1; }

label { font-weight: 700; font-size: 0.8rem; color: #64748b; }
input, select { padding: 12px; border: 2px solid #f1f5f9; border-radius: 10px; font-size: 0.95rem; background: #f8fafc; font-family: inherit; width: 100%; }

.actions { margin-top: 25px; }
.btn-primary { background: var(--primary); color: white; width: 100%; padding: 15px; border: none; border-radius: 12px; font-weight: 700; cursor: pointer; font-size: 1rem; }

/* Modal Stili */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); }
.modal-content { background: white; margin: 10% auto; padding: 20px; border-radius: 20px; width: 90%; max-width: 600px; max-height: 80vh; overflow-y: auto; }
.close { color: #aaa; float: right; font-size: 30px; font-weight: bold; cursor: pointer; }

/* Düzenleme Kutusu - Mobil Uyumlu */
.edit-hint-container { margin-top: 20px; width: 100%; max-width: 210mm; }
.edit-hint-box { background: #eef2ff; border: 2px solid var(--primary); padding: 15px; border-radius: 15px; display: flex; align-items: center; gap: 15px; }
.edit-icon { font-size: 1.5rem; }
.edit-text strong { font-size: 0.9rem; display: block; color: var(--primary); }
.edit-text p { font-size: 0.8rem; margin: 0; }

/* A4 Tasarımı - Mobilde Taşmayı Önleyen Ayarlar */
.a4-paper { 
    background: white; 
    width: 100%; 
    max-width: 210mm; 
    min-height: 297mm; 
    padding: 15mm; 
    margin: 20px auto; 
    box-shadow: 0 0 30px rgba(0,0,0,0.1); 
    display: none; 
    color: black; 
    line-height: 1.5; 
    font-family: 'Times New Roman', serif; 
    outline: none; 
    box-sizing: border-box; 
    overflow-x: auto; /* İçerik çok genişse yatay kaydırma sağlar */
    word-wrap: break-word;
}

@media (max-width: 768px) {
    .a4-paper { padding: 10mm; font-size: 14px; } /* Mobilde yazıları biraz küçültür */
}

/* Alt Butonlar - Mobilde Yan Yana veya Alt Alta */
.bottom-actions { 
    margin-bottom: 50px; 
    display: flex; 
    gap: 10px; 
    width: 100%; 
    max-width: 210mm; 
}

@media (max-width: 500px) {
    .bottom-actions { flex-direction: column; }
}

.btn-success, .btn-word { flex: 1; padding: 15px; border: none; border-radius: 12px; font-weight: 700; cursor: pointer; font-size: 0.9rem; color: white; display: flex; align-items: center; justify-content: center; gap: 5px; }
.btn-success { background: var(--success); }
.btn-word { background: var(--word); }

footer { text-align: center; margin-bottom: 20px; border-top: 1px solid #e2e8f0; padding-top: 20px; width: 100%; max-width: 400px; }
footer a { color: var(--primary); text-decoration: none; font-weight: 700; font-size: 1rem; }

/* Yazdırma Ayarları */
@media print {
    @page { size: A4; margin: 0; }
    body { background: white; padding: 0; }
    .no-print, footer, .bottom-actions, .app-container, .edit-hint-container { display: none !important; }
    .a4-paper { display: block !important; margin: 0 !important; width: 210mm; height: 297mm; padding: 15mm !important; box-shadow: none !important; overflow: hidden; }
}