@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
    html {
        scroll-behavior: smooth;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    body {
        @apply font-sans text-gray-900 bg-[#f8f9fa];
    }

    ::selection {
        @apply bg-red-100 text-red-900;
    }
}

@layer components {
    .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;
    }

    .breaking-news-anim {
        -webkit-animation: marquee 30s linear infinite;
        animation: marquee 30s linear infinite;
    }

    .animate-in {
        animation: fadeIn 0.4s ease-out;
    }

    .news-card {
        @apply bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden hover:shadow-md transition-shadow;
    }

    .category-badge {
        @apply px-3 py-1 bg-red-600 text-white text-[10px] font-bold uppercase rounded-full;
    }

    .section-title {
        @apply text-2xl font-black uppercase tracking-tighter border-l-4 border-red-600 pl-4;
    }
}

@layer utilities {
    .text-balance {
        text-wrap: balance;
    }
}

/* Safari uyumlu marquee animasyonu */
@-webkit-keyframes marquee {
    0% {
        -webkit-transform: translateX(0);
        transform: translateX(0);
    }
    100% {
        -webkit-transform: translateX(-50%);
        transform: translateX(-50%);
    }
}

@keyframes marquee {
    0% {
        -webkit-transform: translateX(0);
        transform: translateX(0);
    }
    100% {
        -webkit-transform: translateX(-50%);
        transform: translateX(-50%);
    }
}

/* Safari uyumlu fadeIn */
@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
        -webkit-transform: translateY(10px);
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        -webkit-transform: translateY(10px);
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

/* Safari uyumlu slideUp */
@-webkit-keyframes slideUp {
    from {
        opacity: 0;
        -webkit-transform: translateY(20px);
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        -webkit-transform: translateY(20px);
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

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

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(147, 51, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(147, 51, 234, 0.6);
    }
}

/* AI Summary Animation */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slideUp {
    animation: slideUp 0.3s ease-out forwards;
}

/* Article Body Styles - Zengin İçerik */
.article-h2 {
    @apply text-2xl font-bold text-gray-900 mt-10 mb-5 pb-3 border-b-2 border-red-100 relative;
    padding-left: 1rem;
    border-left: 4px solid #dc2626;
}

.article-h3 {
    @apply text-xl font-bold text-gray-800 mt-8 mb-4 pl-4;
    border-left: 3px solid #ef4444;
}

.article-lead {
    @apply text-xl font-medium text-gray-900 leading-relaxed mb-8;
}

.article-lead::first-letter {
    @apply text-5xl font-bold text-red-600 float-left mr-3 mt-1;
    line-height: 1;
}

.article-p {
    @apply mb-5 text-[17px] leading-8 text-gray-700;
}

.article-quote {
    @apply border-l-4 border-red-500 pl-5 py-4 my-8 bg-gradient-to-r from-red-50 to-transparent rounded-r-xl italic text-gray-700 relative;
}

.article-quote::before {
    content: '"';
    @apply absolute -top-2 left-2 text-6xl text-red-200 font-serif;
}

.article-ul {
    @apply my-6 space-y-3 pl-0 list-none;
}

.article-ol {
    @apply my-6 space-y-3 pl-6 list-decimal;
}

.article-li {
    @apply flex items-start gap-3 text-gray-700 text-[17px] leading-7;
}

.article-li::before {
    content: '';
    @apply w-2 h-2 bg-red-500 rounded-full mt-2.5 flex-shrink-0;
}

.article-li.numbered::before {
    display: none;
}

/* Legacy article-body styles for backward compatibility */
.article-body h2 {
    @apply text-2xl font-bold text-gray-900 mt-10 mb-5 pb-3 border-b-2 border-red-100 relative;
}

.article-body h2::before {
    content: '';
    @apply absolute bottom-0 left-0 w-16 h-0.5 bg-red-600;
}

.article-body h3 {
    @apply text-xl font-bold text-gray-900 mt-8 mb-4 flex items-center gap-3;
}

.article-body h3::before {
    content: '';
    @apply w-1 h-6 bg-red-500 rounded-full;
}

.article-body p {
    @apply mb-5 text-[17px] leading-8 text-gray-700;
}

.article-body strong {
    @apply font-semibold text-gray-900;
}

.article-body blockquote {
    @apply border-l-4 border-red-500 pl-5 py-3 my-8 bg-gradient-to-r from-red-50 to-transparent rounded-r-lg italic text-gray-700 relative;
}

.article-body blockquote::before {
    content: '"';
    @apply absolute -top-2 left-2 text-6xl text-red-200 font-serif;
}

.article-body ul {
    @apply my-6 space-y-3 pl-0;
}

.article-body li {
    @apply flex items-start gap-3 text-gray-700;
}

.article-body li::before {
    content: '';
    @apply w-2 h-2 bg-red-500 rounded-full mt-2.5 flex-shrink-0;
}

/* Reading Progress Effect */
.article-content-wrapper {
    @apply relative;
}

/* Highlight Important Text */
.article-body mark {
    @apply bg-yellow-100 px-1 rounded;
}

/* Info Box */
.info-box {
    @apply p-5 bg-blue-50 border-l-4 border-blue-500 rounded-r-lg my-6;
}

/* Warning Box */
.warning-box {
    @apply p-5 bg-amber-50 border-l-4 border-amber-500 rounded-r-lg my-6;
}

/* Mobile Safe Area */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Mobile Bottom Bar Animation */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mobile-bottom-bar {
    animation: slideInUp 0.3s ease-out;
}

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

::-webkit-scrollbar-track {
    @apply bg-gray-100;
}

::-webkit-scrollbar-thumb {
    @apply bg-gray-300 rounded-full;
}

::-webkit-scrollbar-thumb:hover {
    @apply bg-gray-400;
}