/* Fal & İçerik Sistemi - Ana Stil Dosyası */

/* Mobil First - Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
}

/* Touch-friendly buttons */
button, a.button, input[type="submit"], input[type="button"] {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Mobil optimizasyonlar */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Kartlar mobilde daha büyük */
    .card-option {
        min-height: 120px;
    }
    
    /* Form elemanları mobilde daha büyük */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="file"],
    textarea,
    select {
        font-size: 16px; /* iOS zoom önleme */
        min-height: 44px;
    }
    
    /* Butonlar mobilde tam genişlik */
    button.full-width-mobile {
        width: 100%;
    }
}

/* Tablet optimizasyonlar */
@media (min-width: 641px) and (max-width: 1024px) {
    .container {
        max-width: 768px;
    }
}

/* Desktop optimizasyonlar */
@media (min-width: 1025px) {
    .container {
        max-width: 1280px;
    }
}

/* Scrollbar stilleri */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(17, 24, 39, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.7);
}

/* Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(168, 85, 247, 0.3);
    border-top: 3px solid rgba(168, 85, 247, 1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Offline indicator */
.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ef4444;
    color: white;
    text-align: center;
    padding: 0.5rem;
    z-index: 9999;
    display: none;
}

.offline-indicator.show {
    display: block;
}

/* PWA Install Prompt */
.pwa-install-prompt {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background: rgba(17, 24, 39, 0.95);
    border: 2px solid rgba(168, 85, 247, 0.5);
    border-radius: 0.75rem;
    padding: 1rem;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(10px);
}

.pwa-install-prompt.show {
    display: block;
}

/* Görsel yükleme alanları */
.image-upload-area {
    border: 2px dashed rgba(168, 85, 247, 0.5);
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.image-upload-area:hover {
    border-color: rgba(168, 85, 247, 0.8);
    background: rgba(168, 85, 247, 0.1);
}

.image-upload-area.drag-over {
    border-color: rgba(168, 85, 247, 1);
    background: rgba(168, 85, 247, 0.2);
}

/* Mobil görsel preview */
.image-preview {
    position: relative;
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Safe area için (iPhone X ve üzeri) */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}

/* Print stilleri */
@media print {
    .no-print {
        display: none !important;
    }
}
