/* Custom styles for MotiGoo */

/* iPhone Safe Area (Çentik düzeltmesi) */
body {
    padding-bottom: env(safe-area-inset-bottom);
}

/* PWA Standalone Mode - Navbar çentik altında */
@media (display-mode: standalone) {
    /* Çentik bölgesini yeşil yap */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: env(safe-area-inset-top);
        background-color: #10b981; /* primary yeşil */
        z-index: 9998;
    }
    
    /* Navbar çentiğin HEMEN ALTINDA başlasın */
    .navbar, .fixed-top {
        top: env(safe-area-inset-top) !important;
        position: fixed !important;
        z-index: 9999 !important;
    }
    
    /* İçerik için üstten boşluk - çentik + navbar yüksekliği */
    body {
        padding-top: calc(env(safe-area-inset-top) + 56px) !important;
    }
}

/* Alt navigasyon için safe area */
.bottom-nav, .fixed-bottom {
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom)) !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

/* Hover effects */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #10b981;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Badge pulse animation */
.badge-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .mobile-padding {
        padding: 1rem;
    }

    .mobile-text-sm {
        font-size: 0.875rem;
    }
    
    /* Better touch targets */
    button, a {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

button:focus, a:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* Smooth transitions */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* ============= CUSTOM COMPONENTS ============= */

/* Info Cards - Bilgi kartları için */
.info-card {
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) {
    .info-card {
        padding: 1.5rem;
    }
}

.dark .info-card {
    background-color: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.5);
}

.info-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111827;
}

@media (min-width: 768px) {
    .info-card-title {
        font-size: 1.25rem;
    }
}

.dark .info-card-title {
    color: #ffffff;
}

.info-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.dark .info-label {
    color: #9ca3af;
}

.info-value {
    color: #111827;
    font-weight: 500;
}

.dark .info-value {
    color: #ffffff;
}