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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    /* Mobil için optimize */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
}

/* Mobil viewport fix */
@viewport {
    width: device-width;
    zoom: 1.0;
}

/* Landing Page - Mobil Optimize */
.landing-container {
    width: 100%;
    max-width: 480px; /* Mobil için maksimum genişlik */
    margin: 0 auto;
    min-height: 100vh;
    background: url('/assets/images/landingpage.jpg') no-repeat center center;
    background-size: cover;
    position: relative;
}

.landing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.landing-content {
    position: relative;
    z-index: 1;
}

/* Login Page - Mobil Optimize */
.login-container {
    width: 100%;
    max-width: 480px; /* Mobil için maksimum genişlik */
    margin: 0 auto;
    min-height: 100vh;
    background: #f0f4f8;
    position: relative;
}

.back-button {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 44px; /* Touch-friendly boyut */
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.back-arrow {
    width: 20px;
    height: 20px;
    border-left: 3px solid #17a2b8;
    border-bottom: 3px solid #17a2b8;
    transform: rotate(45deg);
}

.login-header {
    padding: 70px 20px 25px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
}

.login-form {
    padding: 0 20px;
}

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

.form-input {
    width: 100%;
    padding: 16px 18px;
    font-size: 16px; /* iOS zoom engelleme için minimum 16px */
    border: none;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    -webkit-appearance: none; /* iOS default stil kaldırma */
    appearance: none;
}

.form-input:focus {
    outline: none;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.2);
}

.form-input::placeholder {
    color: #95a5a6;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    font-size: 17px;
    font-weight: 600;
    color: white;
    background: #17a2b8;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
    margin-bottom: 12px;
    /* Touch-friendly */
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.2);
}

.btn-secondary {
    width: 100%;
    padding: 16px;
    font-size: 15px;
    font-weight: 600;
    color: #17a2b8;
    background: white;
    border: 2px solid #17a2b8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
}

.btn-secondary:active {
    background: #f0f9fa;
    transform: scale(0.98);
}

/* Error Messages - Mobil Optimize */
.error-message {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
    border: 1px solid #fcc;
    line-height: 1.5;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
    border: 1px solid #cfc;
    line-height: 1.5;
}

/* Loading Animation - Mobil */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

.loading-subtext {
    font-size: 15px;
    opacity: 0.9;
}

/* İstatistik göstergesi - Mobil için küçültülmüş */
.stats-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    padding: 10px 14px;
    border-radius: 10px;
    color: white;
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 100;
    max-width: 140px;
}

.stat-row {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 11px;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-icon {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

.online-dot {
    background: #2ecc71;
}

.total-dot {
    background: #3498db;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.stat-label {
    opacity: 0.85;
    margin-right: 6px;
    font-size: 11px;
}

.stat-value {
    font-weight: 700;
    font-size: 13px;
}

/* SMS Info - Mobil */
.sms-info {
    background: #e8f4f8;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
    color: #17a2b8;
    font-size: 13px;
    line-height: 1.5;
}

.sms-code-input {
    text-align: center;
    letter-spacing: 8px;
    font-size: 22px;
    font-weight: 600;
}

.resend-link {
    text-align: center;
    margin-top: 12px;
}

.resend-link button {
    background: none;
    border: none;
    color: #17a2b8;
    text-decoration: underline;
    cursor: pointer;
    font-size: 13px;
    padding: 8px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.timer {
    color: #7f8c8d;
    font-size: 12px;
    text-align: center;
    margin-top: 8px;
}

/* Success Details - Mobil */
.success-icon {
    width: 70px;
    height: 70px;
    border: 4px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    animation: scaleIn 0.5s ease-out;
}

.success-icon::before {
    content: '✓';
    font-size: 45px;
    color: white;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-details {
    background: rgba(255, 255, 255, 0.1);
    padding: 16px;
    border-radius: 10px;
    margin-top: 25px;
    text-align: left;
    font-size: 14px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    opacity: 0.85;
    font-size: 13px;
}

.detail-value {
    font-weight: 600;
    font-size: 13px;
}

/* Admin Panel - Desktop için görünür, mobilde gizli */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.admin-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.admin-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
}

.users-table {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8f9fa;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-tc_sifre { background: #ffeaa7; color: #d63031; }
.status-telefon { background: #74b9ff; color: #0984e3; }
.status-sms { background: #a29bfe; color: #6c5ce7; }
.status-loading { background: #fd79a8; color: #d63031; }
.status-completed { background: #55efc4; color: #00b894; }

.btn-group {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-info {
    background: #3498db;
    color: white;
}

.btn-info:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #2ecc71;
    color: white;
}

.btn-success:hover {
    background: #27ae60;
}

/* Login Admin */
.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.admin-login-box {
    background: white;
    padding: 30px 20px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.admin-login-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
}

.masked {
    filter: blur(4px);
    cursor: pointer;
    user-select: none;
}

.unmask-btn {
    padding: 4px 8px;
    font-size: 11px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 5px;
}

.user-row {
    transition: background 0.2s;
}

.user-row:hover {
    background: #f8f9fa;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.online { background: #2ecc71; }
.offline { background: #95a5a6; }

.refresh-info {
    font-size: 12px;
    color: #7f8c8d;
    text-align: right;
    margin-top: 10px;
}

.refresh-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2ecc71;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: pulse 2s infinite;
}

/* Mobil Özel Optimizasyonlar */
@media (max-width: 768px) {
    /* Tüm containerlar mobil için optimize */
    .login-container,
    .landing-container,
    .loading-container {
        max-width: 100%;
    }
    
    /* Form elementleri mobil dostu */
    .form-input {
        font-size: 16px; /* iOS zoom engelleme */
    }
    
    /* Butonlar touch-friendly */
    .btn-primary,
    .btn-secondary {
        min-height: 48px;
        font-size: 16px;
    }
    
    /* Admin panel mobilde tablo scroll */
    .table-responsive {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px;
        font-size: 11px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-sm {
        width: 100%;
        margin-bottom: 4px;
    }
    
    /* İstatistik göstergesi daha küçük */
    .stats-indicator {
        font-size: 10px;
        padding: 8px 10px;
    }
    
    .stat-value {
        font-size: 12px;
    }
}

/* Ekstra küçük ekranlar (iPhone SE, vb.) */
@media (max-width: 375px) {
    .login-title {
        font-size: 24px;
    }
    
    .form-input {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 14px;
        font-size: 15px;
    }
    
    .stats-indicator {
        font-size: 10px;
        padding: 6px 8px;
        max-width: 120px;
    }
}

/* Landscape mode için */
@media (max-height: 500px) and (orientation: landscape) {
    .login-header {
        padding: 40px 20px 20px;
    }
    
    .login-title {
        font-size: 22px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
}
