/* Modern CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Utility class to hide elements */
.hidden {
    display: none !important;
}

:root {
    --primary-bg: #0f0f0f;
    --secondary-bg: #1a1a1a;
    --accent-bg: #252525;
    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --accent-color: #64b5f6;
    --hover-color: #81c784;
    --border-color: #333333;
    --shadow-dark: rgba(0, 0, 0, 0.3);
    --shadow-light: rgba(255, 255, 255, 0.05);
    --terminal-green: #4caf50;
    --soft-glow: rgba(100, 181, 246, 0.1);
    --bmc-color: #252525;
    --send: #4CAF50;
    --send1: #45a049;
    --recieved: #2196F3;
}

/* Theme Variations */
[data-theme="blue"] {
    --primary-bg: #0a0e1a;
    --secondary-bg: #1a1f2e;
    --accent-bg: #252a3a;
    --accent-color: #4fc3f7;
    --hover-color: #29b6f6;
    --terminal-green: #26c6da;
    --soft-glow: rgba(79, 195, 247, 0.15);
    --bmc-color: #252a3a;
    --send: #00bcd4;
    --send1: #0097a7;
    --recieved: #3f51b5;
}

[data-theme="purple"] {
    --primary-bg: #1a0a1a;
    --secondary-bg: #2e1a2e;
    --accent-bg: #3a253a;
    --accent-color: #ba68c8;
    --hover-color: #ab47bc;
    --terminal-green: #ce93d8;
    --soft-glow: rgba(186, 104, 200, 0.15);
    --bmc-color: #3a253a;
    --send: #9c27b0;
    --send1: #7b1fa2;
    --recieved: #e91e63;
}

[data-theme="green"] {
    --primary-bg: #0a1a0a;
    --secondary-bg: #1a2e1a;
    --accent-bg: #253a25;
    --accent-color: #66bb6a;
    --hover-color: #4caf50;
    --terminal-green: #81c784;
    --soft-glow: rgba(102, 187, 106, 0.15);
    --send: #4caf50;
    --send1: #388e3c;
    --recieved: #8bc34a;
}

[data-theme="orange"] {
    --primary-bg: #1a1a0a;
    --secondary-bg: #2e2e1a;
    --accent-bg: #3a3a25;
    --accent-color: #ffb74d;
    --hover-color: #ffa726;
    --terminal-green: #ffcc02;
    --soft-glow: rgba(255, 183, 77, 0.15);
    --bmc-color: #3a3a25;
    --send: #ff9800;
    --send1: #f57c00;
    --recieved: #ff5722;
}

/* Base Styles */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background: var(--primary-bg);
    color: var(--text-primary);
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Typography */
h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin: 3rem auto 2rem auto;
    letter-spacing: -0.01em;
    max-width: 800px;
}

.header-logo {
    display: block;
    margin: 1rem auto 1rem auto;
    width: 150px;
    height: auto;
    outline: none;
    border: none;
    box-shadow: none;
}

@media (min-width: 1200px) {
    .header-logo {
        max-width: 200px;
        margin: 1rem auto 2rem auto;
    }
}

/* Mobile logo adjustments */
@media (max-width: 1080px) {
    /* Ana sayfa – Neden Dil Öğrenmelisin bölümü mobilde tek sütun */
    #why-grid { grid-template-columns: 1fr !important; }
    .header-logo {
        max-width: 150px;
        margin: 1rem auto 2rem auto;
    }
}

@media (max-width: 480px) {
    .header-logo {
        max-width: 150px;
        margin: 1.5rem auto 2rem auto;
    }
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    margin: 2.5rem auto 1.5rem auto;
    max-width: 700px;
}

h3 {
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    font-weight: 500;
    color: var(--accent-color);
    margin: 1.5rem auto 0.5rem auto;
    text-align: center;
    max-width: 600px;
}

p {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 1.2rem auto;
    max-width: 700px;
    text-align: center;
    padding: 0 1.5rem;
}

ul {
    max-width: 600px;
    margin: 1.5rem auto;
    text-align: left;
    padding: 0 2rem;
}

ul li {
    margin: 0.8rem 0;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.8;
}

.terminal-text {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    color: var(--terminal-green);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    text-align: center;
    border-left: 3px solid var(--terminal-green);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem 1rem;
}

.main-content {
    padding-top: 100px;
    min-height: calc(100vh - 150px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 3rem;
}

/* Enhanced Menu Toggle */
.menu-toggle {
    position: fixed;
    top: 14px;
    left: 24px;
    z-index: 1001;
    cursor: pointer;
    width: 44px;
    height: 44px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 12px var(--shadow-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.menu-toggle:hover {
    background: var(--accent-bg);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--soft-glow);
}

/* Theme Switcher */
.theme-switcher {
    position: absolute;
    top: 14px;
    right: 20px;
    z-index: 1001;
    width: 120px;
    height: 36px;
    background: var(--secondary-bg);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 2px 12px var(--shadow-dark);
    cursor: pointer;
}

.theme-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.theme-indicator {
    position: absolute;
    width: 28px;
    height: 28px;
    background: var(--text-primary);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 15px var(--soft-glow);
    z-index: 2;
    border: 2px solid transparent;
    cursor: pointer;
}

.theme-indicator:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 20px var(--soft-glow);
}

.theme-indicator:active {
    transform: translateY(-50%) scale(0.95);
}

.theme-step {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: absolute;
    z-index: 1;
    transition: all 0.2s ease;
    cursor: pointer;
    opacity: 0;
}

.theme-step:hover {
    opacity: 0.3;
    background: var(--accent-color);
}

/* Indicator positions for each theme (4 kademeli) */
.theme-switcher[data-active="default"] .theme-indicator {
    left: 6px;
}

.theme-switcher[data-active="blue"] .theme-indicator {
    left: 32px;
}

.theme-switcher[data-active="purple"] .theme-indicator {
    left: 58px;
}

.theme-switcher[data-active="green"] .theme-indicator {
    left: 84px;
}

/* Theme step positions (invisible click areas) */
.theme-step[data-theme="default"] {
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
}

.theme-step[data-theme="blue"] {
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
}

.theme-step[data-theme="purple"] {
    left: 58px;
    top: 50%;
    transform: translateY(-50%);
}

.theme-step[data-theme="green"] {
    left: 84px;
    top: 50%;
    transform: translateY(-50%);
}

/* Theme color previews - switch altında */
.theme-preview {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    top: calc(100% + 12px);
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transform: translateX(-50%);
}

.theme-preview:hover {
    transform: translateX(-50%) scale(1.2);
}

.theme-preview[data-theme="default"] {
    left: calc(6px + 14px);
    background: linear-gradient(135deg, #000000, #000000);
}

.theme-preview[data-theme="blue"] {
    left: calc(32px + 14px);
    background: linear-gradient(135deg, #4fc3f7, #29b6f6);
}

.theme-preview[data-theme="purple"] {
    left: calc(58px + 14px);
    background: linear-gradient(135deg, #ba68c8, #ab47bc);
}

.theme-preview[data-theme="green"] {
    left: calc(84px + 14px);
    background: linear-gradient(135deg, #66bb6a, #4caf50);
}

/* Active preview highlight */
.theme-switcher[data-active="default"] .theme-preview[data-theme="default"] {
    background: var(--primary-bg);
    box-shadow: none;
    border: none;
    transform: translateX(-50%) scale(1.3);
}

.theme-switcher[data-active="blue"] .theme-preview[data-theme="blue"] {
    background: var(--primary-bg);
    box-shadow: none;
    border: none;
    transform: translateX(-50%) scale(1.3);
}

.theme-switcher[data-active="purple"] .theme-preview[data-theme="purple"] {
    background: var(--primary-bg);
    box-shadow: none;
    border: none;
    transform: translateX(-50%) scale(1.3);
}

.theme-switcher[data-active="green"] .theme-preview[data-theme="green"] {
    background: var(--primary-bg);
    box-shadow: none;
    border: none;
    transform: translateX(-50%) scale(1.3);
}


.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    margin: 3px 0;
    border-radius: 1px;
    transition: all 0.2s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Enhanced Menu Container */
.menu-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    padding: 0 2rem;
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 2px 20px var(--shadow-dark);
}

/* Language Selector */
.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

/* PC'de menü içindeki dil seçiciyi gizle */
.language-menu-item {
    display: none;
}

.language-label {
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.site-language-select {
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

.site-language-select:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--soft-glow);
}

.site-language-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--soft-glow);
}

.site-language-select option {
    background: var(--primary-bg);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Mobile responsive for language selector */
@media (max-width: 1080px) {
    .site-language-select {
        min-width: 120px;
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .language-label {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .site-language-select {
        min-width: 100px;
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .language-label {
        font-size: 0.9rem;
    }
}

/* Language Detection Loading */
.language-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin: 2rem 0;
    background: var(--accent-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.language-loading p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.menu-container.active {
    transform: translateY(0);
}

.menu {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    padding: 0;
    margin: 0 auto;
    list-style: none;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.menu li a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.96rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    height: 100%;
    letter-spacing: 0.2px;
    text-align: center;
    line-height: 1.2;
    width: 14ch;
    white-space: normal;
    word-wrap: break-word;
    hyphens: auto;
    overflow-wrap: break-word;
}

.menu li a:hover,
.menu li a[aria-current="page"] {
    color: var(--text-primary);
    background: var(--accent-bg);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--soft-glow);
}

.content-section {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0rem;
    margin-block-end: 4rem;
    box-shadow: 0 4px 20px var(--shadow-dark);
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0rem;
}

.content-section ul {  
    list-style: none;  
    padding-left: 0;  
} 

.content-section h2 {  
    margin: 1rem auto 2rem auto;
}

.content-section p {
    margin: auto 2rem 1rem 2rem;
    max-width: 800px;
    font-size: 1rem;
    line-height: 1.6;
}

.content-section .terminal-text {
    margin: 1rem auto;
    max-width: 600px;
    font-size: 0.9rem;
}

.content-section h3 {
    margin: 0rem auto 0.5rem auto;
}

.download-section {
    margin: 1rem 0;
}

.download-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.desktop-grid {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

@media (max-width: 1080px) {
    .desktop-grid {
        flex-wrap: wrap;
    }
}

.download-button {
    flex: 1 1 150px;
    width: 140px;
    height: 160px;
    background-color: var(--accent-bg);
    color: var(--text-primary);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px var(--shadow-dark);
    gap: 0.5rem;
}

.download-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--soft-glow);
    border-color: var(--accent-color);
}

.download-button:active {
    transform: translateY(-2px);
}

.download-button h3 {
    margin: 0.5rem 0 0.3rem 0;
    font-size: 1.2rem;
    font-weight: 450;
    color: var(--accent-color);
}

.download-button p {
    margin: 0.5rem 0 0.3rem 0;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.download-icon {
    display: absolute;
}

/* Platform Icons - Deprecated, using img elements instead */
.windows-icon { display: none; }
.mac-icon { display: none; }
.linux-icon { display: none; }
.android-icon { display: none; }
.ios-icon { display: none; }

/* Inline logo images for download buttons */
.download-logo {
    width: 48px;
    height: 48px;
    margin: 0;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
    background: transparent;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
}
input[type="email"] {
    padding: 0.75rem 1rem;
    border: 1px solid var(--secondary-bg);
    border-radius: 30px;
    width: 80%;
    background-color: var(--secondary-bg);
    color: var(--text-primary);
    outline: none;
    font-size: 1rem;
}
.mailbutton {
    background-color: var(--secondary-bg);
    color: var(--text-primary);
    border: none;
    border-radius: 15px;
    width: 120px;
    height: 40px;
    font-size: 1rem;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 20px
}
.mailbutton:hover {
    box-shadow: var(--accent-bg);
    transform: translateY(-2px);
}
#message {
    margin-top: 1rem;
    color: var(--text-primary);
    font-weight: bold;
}

/* Enhanced Footer */
.footer {
    height: 100px;
    text-align: center;
    background: var(--accent-bg);
    border-top: 1px solid var(--border-color);
}

/* Footer link container for proper distribution */
.footer-links-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 1rem !important;
    gap: 0 !important;
}

.footer-links-container .contact-btn {
    flex: 1 !important;
    text-align: center !important;
    margin: 0 !important;
}

.footer-links-container .privacy-link {
    text-align: left !important;
    margin: 0 !important;
}

.footer-links-container .terms-link {
    text-align: right !important;
    margin: 0 !important;
}

.github-logo {
    margin-top: 2px;
    width: 40px;
    height: 40px;
    opacity: 0.6;
    transition: all 0.2s ease;
    border-radius: 8px;
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
}

.github-logo:hover {
    opacity: 1;
    transform: scale(1.05);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--soft-glow);
}

/* Responsive Design */
@media (max-width: 1080px) {
    .desktop-ads-container, .left-banner-ad, .right-banner-ad { display: none !important; }
    
    .menu-container {
        height: auto;
        min-height: 160px;
        justify-content: center;
        align-items: center;
    }
    
    .menu {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem;
        justify-content: center;
        position: static;
        transform: none;
        left: auto;
        width: 100%;
    }
    
    .menu li a {
        font-size: 0.88rem;
        padding: 6px 12px;
        width: 12ch;
        line-height: 1.1;
    }
    
    .language-menu-item {
        margin-top: 0.5rem;
        display: block !important;
    }
    
    .language-menu-item .language-selector {
        justify-content: center;
        position: static;
        right: auto;
        top: auto;
        transform: none;
    }
    
    /* PC'de dil seçiciyi gizle */
    .menu-container > .language-selector {
        display: none;
    }
    
    /* Chat sayfası için özel kurallar */
    .chat-header .header-right .language-selector {
        position: static;
        transform: none;
    }
    
    .chat-header .header-right .menu {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        position: static;
        transform: none;
        left: auto;
        width: auto;
    }
    
    .main-content {
        padding-top: 70px;
        align-items: center;
        text-align: center;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .desktop-grid {
        flex-wrap: wrap;
    }
    
    .content-section {
        padding: 2rem;
        margin: 1rem auto;
        text-align: center;
    }
    
    .container {
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .menu-toggle {
        width: 40px;
        height: 40px;
        top: 20px;
        left: 20px;
    }
    
    .menu-container {
        min-height: 140px;
        justify-content: center;
        align-items: center;
    }
    
    .menu {
        width: 100%;
        position: static;
        transform: none;
        left: auto;
    }
    
    .menu li a {
        font-size: 0.84rem;
        padding: 5px 10px;
        width: 10ch;
        line-height: 1.0;
    }
    
    .language-menu-item {
        margin-top: 0.3rem;
        display: block !important;
    }
    
    .language-menu-item .language-selector {
        justify-content: center;
        position: static;
        right: auto;
        top: auto;
        transform: none;
    }
    
    /* PC'de dil seçiciyi gizle */
    .menu-container > .language-selector {
        display: none;
    }
    
    /* Chat sayfası için özel kurallar - küçük ekranlar */
    .chat-header .header-right .language-selector {
        position: static;
        transform: none;
    }
    
    .chat-header .header-right .menu {
        display: flex;
        flex-direction: row;
        gap: 0.3rem;
        position: static;
        transform: none;
        left: auto;
        width: auto;
    }
    
    /* Adjusted positions for mobile (4 kademe) */
    .theme-switcher[data-active="default"] .theme-indicator {
        left: 2px;
    }
    
    .theme-switcher[data-active="blue"] .theme-indicator {
        left: 31px;
    }
    
    .theme-switcher[data-active="purple"] .theme-indicator {
        left: 60px;
    }
    
    .theme-switcher[data-active="green"] .theme-indicator {
        left: 88px;
    }
    
    /* Mobile theme step positions */
    .theme-step[data-theme="default"] {
        left: 2px;
    }
    
    .theme-step[data-theme="blue"] {
        left: 31px;
    }
    
    .theme-step[data-theme="purple"] {
        left: 60px;
    }
    
    .theme-step[data-theme="green"] {
        left: 88px;
    }

    .theme-indicator {
        width: 28px;
        height: 28px;
    }

    .theme-preview {
        width: 12px;
        height: 12px;
        top: calc(100% + 10px);
    }
    
    .theme-preview[data-theme="default"] {
        left: calc(2px + 14px);
    }
    
    .theme-preview[data-theme="blue"] {
        left: calc(31px + 14px);
    }
    
    .theme-preview[data-theme="purple"] {
        left: calc(60px + 14px);
    }
    
    .theme-preview[data-theme="green"] {
        left: calc(88px + 14px);
    }
    
    .theme-preview:hover {
        transform: translateX(-50%) scale(1.08);
    }

    .content-section {
        padding: 1.5rem;
        margin: 0.8rem auto;
        text-align: center;
    }
    
    .download-button {
        padding: 0.8rem;
        width: 110px;
        height: 150px;
    }
    
    .download-icon {
        display: none; /* Replaced with img elements */
    }

    .download-logo {
        width: 56px;
        height: 56px;
        margin: 0;
    }
    
    p {
        padding: 0 1rem;
    }
    
    h1, h2, h3 {
        padding: 0 0.5rem;
    }
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Smooth Transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* High Contrast Focus States */
*:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-color), var(--hover-color));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--hover-color);
}

.esles {
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 12px; 
    height: 35px; 
    width: 120px ; 
    color: var(--accent-bg); 
    background-color: var(--accent-color);
    border: none;
    font-weight: bolder;
    font-size: 15px;
}

.esles:hover {
    background-color: var(--hover-color);
    border-color: var(--hover-color);
    transform: translateY(-2px);
}

.donate-button {
    padding: 10px 20px;
    position: fixed;
    bottom: 14px;
    right: 24px;
    align-items: center;
    background-color: var(--accent-bg);
    color: var(--terminal-green);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    margin: 0 auto;
    border: none;
    border-radius: 25px;
}

/* Popup Styles */
.donate-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.donate-popup.active {
    opacity: 1;
    visibility: visible;
}

.donate-popup-content {
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(0);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.donate-popup.active .donate-popup-content {
    transform: translateY(0);
}

.donate-popup-header {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.donate-popup-header h3 {
    margin: 0;
    text-align: center;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.donate-close {
    top: 2px;
    right: 2px;
    position: absolute;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}
.donate-close:hover {
    background: var(--accent-bg);
    color: var(--text-primary);
}

.donate-popup-body {
    text-align: center;
    padding: 1.5rem 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donate-popup-body p {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 2rem 0;
    color: var(--text-primary);
    line-height: 1.6;
    text-align: center;
}

.donate-button:hover {
    box-shadow: 2px 8px 20px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

.donate-button:active {
    transform: translateY(0);
}

.bmc-button-container {
    display: flex;
    justify-content: center;
}

.bmc-button {
    display: inline-flex;
    align-items: center;
    background-color: var(--primary-bg);
    color: var(--terminal-green);
    text-decoration: none;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 30px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px var(--secondary-bg 0.3);
}

.bmc-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px var(--secondary-bg 0.3);
}

.bmc-button:active {
    transform: translateY(0);
}

.android-container {
    margin-top: 2rem;
}

/* Responsive adjustments for Android container */
@media (max-width: 768px) {
    .android-container {
        margin-top: 1.5rem;
    }
}

/* Google AdSense Responsive Stilleri */
.adsense-container {
    margin: 2rem auto;
    max-width: 728px;
    min-height: 90px;
    background: var(--accent-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.adsense-sidebar {
    margin: 2rem auto;
    max-width: 300px;
    min-height: 600px;
    background: var(--accent-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.adsense-placeholder {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

/* Mobil cihazlar için AdSense düzenlemeleri */
@media (max-width: 768px) {
    .adsense-container {
        max-width: 320px;
        min-height: 90px;
        margin: 1rem auto;
    }

    .adsense-sidebar {
        max-width: 320px;
        min-height: 250px;
        margin: 1rem auto;
    }

    .adsense-placeholder {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .adsense-container {
        max-width: 320px;
        min-height: 100px;
    }

    .adsense-sidebar {
        max-width: 320px;
        min-height: 250px;
    }
}

/* Desktop-only sınıfı */
.desktop-only {
    display: block;
}

/* Mobile-only sınıfı */
.mobile-only {
    display: none;
}

/* Mobil cihazlarda bazı reklamları gizle */
@media (max-width: 1080px) {
    /* Desktop-only sınıfını gizle */
    .desktop-only {
        display: none !important;
    }
    
    /* Mobile-only sınıfını göster */
    .mobile-only {
        display: block !important;
    }
    
    /* Mobilde sidebar reklamlarını gizle */
    .adsense-sidebar {
        display: none !important;
    }
    
    /* Mobilde orta banner reklamını gizle */
    .adsense-container:nth-of-type(2) {
        display: none !important;
    }
}

@media (max-width: 480px) {
    /* Küçük mobilde sadece üst ve alt banner reklamları göster */
    .adsense-container:not(:first-child):not(:last-child) {
        display: none !important;
    }
}

/* Dictionary Widget Styles */
.dictionary-widget {
    position: fixed;
    bottom: 14px;
    left: 24px;
    z-index: 1000;
    /* Kapalı durumda sadece başlık görünsün */
    background: transparent;
    border: 0;
    border-radius: 30px;
    box-shadow: none;
    width: auto;
    height: auto;
    overflow: visible;
    transition: width 0.25s ease, max-height 0.25s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.dictionary-widget.open {
    background: var(--primary-bg);
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 360px; /* arama sonrası da genişlik sabit */
    max-height: 600px; /* açık durum yükseklik */
}

.dictionary-widget:not(.open) .dictionary-widget-content {
    display: none;
}

.dictionary-widget-header {
    background: var(--accent-bg);
    color: var(--terminal-green);
    padding: 10px 20px; /* donate ile aynı */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 25px; /* donate ile aynı */
    border: 0;
}

.dictionary-widget-title {
    font-weight: 600;
    font-size: 1rem;
}

.dictionary-widget-toggle {
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.2s ease;
    height: 40px;
    line-height: 20px;
}

.dictionary-widget-toggle:hover {
    background: var(--accent-bg);
    transform: translateY(-2px);
}

.dictionary-widget-content {
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.dictionary-widget-search {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap; /* diller her zaman alt satırda */
}

.dictionary-widget-input {
    width: auto;
    flex: 1 1 auto;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--accent-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.dictionary-widget-search-btn {
    margin: 0; /* arama sonrası aşağı düşmeyi engelle */
    border-radius: 10px;
    border: 1px solid #fff;
    padding: 0.5rem 1rem;
    background-color: var(--primary-bg);
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    flex: 0 0 auto; /* buton kırılmasın */
}

.dictionary-widget-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.dictionary-widget-langs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    width: 100%;
    flex-basis: 100%; /* her zaman yeni satıra geçsin */
}

.dictionary-widget-lang {
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--accent-bg);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.dictionary-widget-lang.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.dictionary-widget-result {
    background: var(--accent-bg);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent-color);
}

.dictionary-widget-word {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.dictionary-widget-phonetic {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.dictionary-widget-meaning {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.dictionary-widget-example {
    background: var(--primary-bg);
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.dictionary-widget-no-result {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 1rem;
}

.dictionary-widget-popular {
    margin-top: 1rem;
}

.dictionary-widget-popular-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.dictionary-widget-popular-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.dictionary-widget-popular-word {
    background: var(--accent-bg);
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.dictionary-widget-popular-word:hover {
    border-color: var(--accent-color);
    background: var(--primary-bg);
}

.dictionary-widget-popular-text {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.dictionary-widget-popular-meaning {
    color: var(--text-secondary);
    font-size: 0.7rem;
    line-height: 1.3;
}

/* Mobile responsive for dictionary widget */
@media (max-width: 768px) {
    .dictionary-widget {
        width: 56px; /* mobil kapalı durum */
        left: 20px;
        right: auto;
        bottom: 40px; /* 20px yukarı taşındı */
    }
    .dictionary-widget.open {
        width: calc(100vw - 40px); /* mobil açık durum */
        left: 20px;
        right: 20px;
    }
    
    .dictionary-widget-popular-grid {
        grid-template-columns: 1fr;
    }
    
    /* Bağış butonunu da yukarı taşı */
    .donate-button {
        bottom: 40px; /* 20px yukarı taşındı */
    }
}

/* Hide dictionary widget on mobile when menu is open */
@media (max-width: 768px) {
    .menu-container.active ~ .dictionary-widget {
        display: none;
    }
}

/* Dictionary widget upward panel overrides */
.dictionary-widget {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
}
.dictionary-widget.open {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    width: 360px !important;
}
.dictionary-widget-header {
    border-radius: 9999px !important;
    padding: 10px 16px !important;
    display: inline-flex !important;
}
.dictionary-widget-title { font-size: 1.2rem !important; }
.dictionary-widget-content {
    position: absolute !important;
    bottom: calc(100% + 8px) !important;
    left: 0 !important;
    background: var(--primary-bg) !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    width: 320px !important;
    max-height: 60vh !important;
    display: none !important;
}
.dictionary-widget.open .dictionary-widget-content { display: block !important; }

@media (max-width: 1080px) {
    .dictionary-widget-title { font-size: 1.35rem !important; }
    .dictionary-widget-header { padding: 12px 18px !important; }
    .dictionary-widget-content { width: calc(100vw - 40px) !important; }
}
