/* Modern, AI-Inspired Technology News Site CSS */

/* Mobil tarayıcılar için renk şeması - override engelle */
html {
    -webkit-tap-highlight-color: transparent;
    color-scheme: dark;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --dark-bg: #1a1a2e;
    --darker-bg: #0f0f1e;
    --light-bg: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #b8b8d4;
    --border-color: #2d2d44;
    --card-bg: #1e1e3f;
    --hover-bg: #2a2a4a;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #1a1a2e; /* Mobil fallback */
    background-color: var(--dark-bg);
    color: #ffffff;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header */
.header {
    background: #667eea; /* Mobil fallback - gradient açılmazsa */
    background: var(--gradient-1);
    -webkit-background-size: 100% 100%;
    background-size: 100% 100%;
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.menu-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    display: none;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff; /* Mobil fallback */
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
    .logo h1 { color: transparent; }
}

.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.3s;
    font-weight: 500;
}

.nav a:hover,
.nav a.active {
    background: rgba(255, 255, 255, 0.2);
}

.lang-selector {
    display: flex;
    gap: 8px;
}

.lang-selector a {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.3s;
}

.lang-selector a:hover,
.lang-selector a.active {
    background: rgba(255, 255, 255, 0.3);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    width: 300px;
    height: 100vh;
    background: var(--card-bg);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    transition: left 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    background: var(--gradient-1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 20px;
    color: white;
}

.close-sidebar {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.close-sidebar:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav a {
    display: block;
    padding: 15px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--hover-bg);
    border-left-color: var(--primary-color);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1500;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px 0;
}

.section-title {
    font-size: 32px;
    margin-bottom: 30px;
    color: #f093fb; /* Mobil fallback - gradient açılmazsa */
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
    .section-title { color: transparent; }
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.news-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
    position: relative;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.news-card.pinned {
    border: 2px solid var(--primary-color);
}

.pinned-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gradient-1);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

.news-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--darker-bg);
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-content {
    padding: 20px;
}

.news-title {
    font-size: 20px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.views-count {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* News Detail */
.news-detail {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 40px;
    border: 1px solid var(--border-color);
}

.news-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--accent-color);
}

.news-detail-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 30px;
}

.news-detail-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.news-detail-title {
    font-size: 36px;
    margin-bottom: 25px;
    line-height: 1.3;
    color: #f093fb; /* Mobil fallback */
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
    .news-detail-title { color: transparent; }
}

.news-detail-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

/* Services */
.services-container {
    max-width: 800px;
    margin: 0 auto;
}

.service-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 40px;
    border: 1px solid var(--border-color);
}

.service-card h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #f093fb; /* Mobil fallback */
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
    .service-card h2 { color: transparent; }
}

.tool-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    background: var(--darker-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-group label:has(input[type="checkbox"]) {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.currency-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.result-box {
    margin-top: 20px;
    padding: 20px;
    background: var(--darker-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.result-box input[type="text"] {
    width: 100%;
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 10px;
}

.btn-copy {
    background: var(--gradient-3);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: transform 0.2s;
}

.btn-copy:hover {
    transform: translateY(-2px);
}

.result-display {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    padding: 20px;
}

#qrResult {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

#qrResult canvas {
    border-radius: 10px;
    background: white;
    padding: 10px;
}

/* Footer */
.footer {
    background: var(--darker-bg);
    padding: 30px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
}

.adsense-header,
.adsense-footer {
    padding: 20px;
    text-align: center;
    background: var(--card-bg);
    margin: 20px 0;
    border-radius: 8px;
}

.no-news {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 18px;
}

/* Responsive - Mobil renk uyumu */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav {
        display: none;
    }

    .lang-selector {
        flex-wrap: wrap;
    }

    .lang-selector a {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.2);
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card {
        background: #1e1e3f;
        border-color: #2d2d44;
    }

    .news-detail {
        padding: 20px;
        background: #1e1e3f;
    }

    .news-detail-title {
        font-size: 24px;
        color: #f093fb;
    }

    .currency-row {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 20px;
        background: #1e1e3f;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .header {
        background: #667eea;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .section-title {
        color: #f093fb;
    }

    .main-content {
        background: #1a1a2e;
    }

    .footer {
        background: #0f0f1e;
        color: #b8b8d4;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .section-title {
        font-size: 24px;
    }

    .news-detail-title {
        font-size: 20px;
    }
}

/* ============================================
   MOBİL EKRAN UYUMU - style.css dosyasının
   EN SONUNA bu blokları ekle (kopyala-yapıştır).
   Telefon ekranına tam uyum için.
   ============================================ */

/* Tüm cihazlarda taşmayı önle */
html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
    min-width: 0;
}

/* Container mobilde tam genişlik, yan taşma yok */
.container {
    max-width: 100%;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

/* Mobil: ekran genişliğine sıkı uyum */
@media (max-width: 768px) {
    html {
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    body {
        overflow-x: hidden;
        max-width: 100vw;
        min-width: 0;
    }

    .container {
        max-width: 100vw;
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }

    .header .container,
    .main-content .container,
    .footer .container {
        max-width: 100%;
        width: 100%;
    }

    .header-content {
        flex-wrap: wrap;
        max-width: 100%;
    }

    .logo h1 {
        font-size: 18px;
        word-break: break-word;
    }

    .news-grid {
        max-width: 100%;
    }

    .news-card {
        min-width: 0;
        max-width: 100%;
    }

    .news-detail {
        max-width: 100%;
        padding: 15px;
        box-sizing: border-box;
    }

    .news-detail-title {
        font-size: 22px;
        word-wrap: break-word;
    }

    .service-card {
        max-width: 100%;
        padding: 15px;
        box-sizing: border-box;
    }

    .section-title {
        font-size: 22px;
        word-wrap: break-word;
    }

    /* Resimler ekranı aşmasın */
    img {
        max-width: 100%;
        height: auto;
    }

    .news-image img,
    .news-detail-image img {
        max-width: 100%;
        width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .logo h1 {
        font-size: 16px;
    }

    .section-title {
        font-size: 20px;
    }

    .news-detail-title {
        font-size: 18px;
    }
}
