/* ============================================
   MOBIL-FIRST MODERN TASARIM
   Emineller Özel Eğitim ve Rehabilitasyon Merkezi
   ============================================ */

/* Viewport ve Temel Ayarlar */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Mobil için minimum dokunma alanı */
button, .btn, a.btn, input[type="button"], input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 24px;
    font-size: 16px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}

/* Modern Renk Paleti */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #10b981;
    --secondary-dark: #059669;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --success-color: #10b981;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* Modern Card Tasarımı */
.card-modern {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.card-modern:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-modern-header {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

/* Modern Butonlar */
.btn-modern {
    border-radius: var(--radius-sm);
    font-weight: 500;
    padding: 12px 24px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
}

.btn-primary-modern {
    background: var(--primary-color);
    color: white;
}

.btn-primary-modern:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary-modern {
    background: var(--secondary-color);
    color: white;
}

.btn-success-modern {
    background: var(--success-color);
    color: white;
}

.btn-danger-modern {
    background: var(--danger-color);
    color: white;
}

.btn-outline-modern {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-modern:hover {
    background: var(--primary-color);
    color: white;
}

/* Form Elemanları - Mobil Optimize */
.form-control-modern {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px; /* iOS zoom önleme */
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    transition: all 0.2s ease;
    min-height: 44px;
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label-modern {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

/* Checkbox ve Radio - Mobil Dostu */
input[type="checkbox"],
input[type="radio"] {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary-color);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}

label {
    font-size: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    line-height: 1.5;
}

/* Öğrenci Kartları - Mobil Liste */
.student-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
}

.student-card:active {
    transform: scale(0.98);
    background: var(--bg-secondary);
}

.student-card.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.student-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.student-info {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Test Kartları */
.test-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
}

.test-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.test-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Soru Kartları */
.question-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.question-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
}

.option-item:hover {
    border-color: var(--primary-light);
    background: rgba(99, 102, 241, 0.05);
}

.option-item.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

/* Header/Navbar */
.navbar-modern {
    background: white;
    box-shadow: var(--shadow-sm);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand-modern {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

/* Container */
.container-modern {
    max-width: 100%;
    padding: 16px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .container-modern {
        max-width: 750px;
        padding: 24px;
    }
}

@media (min-width: 992px) {
    .container-modern {
        max-width: 970px;
    }
}

@media (min-width: 1200px) {
    .container-modern {
        max-width: 1170px;
    }
}

/* Grid System - Mobil First */
.row-modern {
    display: flex;
    flex-wrap: wrap;
    margin: -8px;
}

.col-modern {
    flex: 1;
    padding: 8px;
}

.col-modern-12 { flex: 0 0 100%; max-width: 100%; }
.col-modern-6 { flex: 0 0 50%; max-width: 50%; }
.col-modern-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-modern-3 { flex: 0 0 25%; max-width: 25%; }

@media (max-width: 767px) {
    .col-modern-6,
    .col-modern-4,
    .col-modern-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Yıldız Rating - Mobil Optimize */
.star-rating {
    display: flex;
    gap: 8px;
    font-size: 32px;
    cursor: pointer;
    touch-action: manipulation;
}

.star-rating .star {
    color: #d1d5db;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-rating .star.active {
    color: #fbbf24;
}

.star-rating .star:hover {
    transform: scale(1.1);
}

/* Badge/Etiketler */
.badge-modern {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Loading Spinner */
.spinner-modern {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

@media (min-width: 768px) {
    .d-md-block { display: block; }
    .d-md-none { display: none; }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* iOS Safe Area */
@supports (padding: max(0px)) {
    body {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

