:root {
    --primary: #4169e1;
    --primary-light: #edf2ff;
    --background: #ffffff;
    --surface: #f7f8fc;
    --text: #182033;
    --muted: #778096;
    --border: #e9ebf2;
    --card: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text);
    transition: background 0.3s ease, color 0.3s ease;
    position: relative;
    overflow-x: hidden;
}

body.dark {
    --background: #101522;
    --surface: #171e2d;
    --text: #f0f3fa;
    --muted: #a1abc0;
    --border: #293247;
    --card: #171e2d;
    --primary-light: #202d4a;
}

/* =========================================
    AURORA (AKAN IŞIK) ARKA PLAN EFEKTİ
    ========================================= */
body::before,
body::after {
    content: "";
    position: fixed;
    width: 70vmax;
    height: 70vmax;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

body::before {
    top: -25vmax;
    left: -20vmax;
    background: radial-gradient(circle, rgba(65, 105, 225, 0.32) 0%, transparent 65%);
    animation: auroraOne 22s ease-in-out infinite alternate;
}

body::after {
    bottom: -28vmax;
    right: -22vmax;
    background: radial-gradient(circle, rgba(128, 84, 217, 0.28) 0%, transparent 65%);
    animation: auroraTwo 26s ease-in-out infinite alternate;
}

body.dark::before {
    background: radial-gradient(circle, rgba(65, 105, 225, 0.38) 0%, transparent 65%);
}

body.dark::after {
    background: radial-gradient(circle, rgba(128, 84, 217, 0.34) 0%, transparent 65%);
}

@keyframes auroraOne {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(25vmax, 18vmax) scale(1.25); }
}

@keyframes auroraTwo {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-22vmax, -20vmax) scale(1.2); }
}

/* =========================================
    ARKA PLAN BİLGİ/MATEMATİK VİBE EFEKTİ
    ========================================= */
.bg-symbols {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
}

body.dark .bg-symbols {
    opacity: 0.25;
}

.bg-symbols span {
    position: absolute;
    display: block;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 800;
    color: var(--primary);
    font-size: 20px;
    bottom: -100px;
    animation: floatUp 12s linear infinite;
    user-select: none;
}

.bg-symbols span:nth-child(1) { left: 5%; animation-duration: 10s; animation-delay: 0s; font-size: 22px; }
.bg-symbols span:nth-child(2) { left: 18%; animation-duration: 14s; animation-delay: 2s; font-size: 16px; }
.bg-symbols span:nth-child(3) { left: 30%; animation-duration: 11s; animation-delay: 4s; font-size: 24px; }
.bg-symbols span:nth-child(4) { left: 42%; animation-duration: 15s; animation-delay: 1s; font-size: 18px; }
.bg-symbols span:nth-child(5) { left: 55%; animation-duration: 13s; animation-delay: 3s; font-size: 26px; }
.bg-symbols span:nth-child(6) { left: 68%; animation-duration: 12s; animation-delay: 5s; font-size: 20px; }
.bg-symbols span:nth-child(7) { left: 78%; animation-duration: 16s; animation-delay: 2s; font-size: 17px; }
.bg-symbols span:nth-child(8) { left: 88%; animation-duration: 11s; animation-delay: 4s; font-size: 23px; }
.bg-symbols span:nth-child(9) { left: 12%; animation-duration: 17s; animation-delay: 3s; font-size: 19px; }
.bg-symbols span:nth-child(10) { left: 48%; animation-duration: 13s; animation-delay: 6s; font-size: 21px; }
.bg-symbols span:nth-child(11) { left: 62%; animation-duration: 18s; animation-delay: 1s; font-size: 18px; }
.bg-symbols span:nth-child(12) { left: 93%; animation-duration: 14s; animation-delay: 0s; font-size: 22px; }

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    100% {
        transform: translateY(-115vh) rotate(360deg);
        opacity: 0;
    }
}

/* =========================================
    GENEL YERLEŞİM VE BİLEŞENLER
    ========================================= */
.container {
    width: 90%;
    max-width: 1150px;
    margin: auto;
    position: relative;
    z-index: 2;
}

/* Cam Efekti (Glassmorphism Header) */
.header {
    height: 75px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
}

body.dark .header {
    background: rgba(16, 21, 34, 0.85);
}

.navbar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
    color: var(--text);
}

.logo > span:last-child {
    color: var(--primary);
    margin-left: -8px;
}

.logo-icon {
    background: var(--primary);
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
}

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    transition: .2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.theme-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 20px;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.hero {
    padding: 105px 0 90px;
    text-align: center;
    background: radial-gradient(ellipse at top, var(--primary-light), transparent 65%);
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: auto;
}

.hero-badge {
    display: inline-block;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 30px;
    padding: 10px 17px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 28px;
}

.hero h1 {
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.15;
    letter-spacing: -2.5px;
    font-weight: 800;
}

.hero h1 span {
    color: var(--primary);
    display: block;
}

.hero p {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8;
    margin: 22px 0 30px;
}

.search-box {
    max-width: 620px;
    height: 62px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 8px 7px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 10px 35px rgba(40,60,120,.08);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.search-box > span {
    color: var(--muted);
    font-size: 26px;
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
}

.search-box button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 9px;
    padding: 13px 23px;
    font-weight: 700;
    cursor: pointer;
}

.hero-info {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 27px;
    color: var(--muted);
    font-size: 12px;
}

.tools-section {
    padding-top: 80px;
    padding-bottom: 100px;
    position: relative;
    z-index: 1;
}

.section-label {
    color: var(--primary);
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 800;
}

.section-heading h2,
.about-content h2 {
    font-size: 32px;
    margin-top: 12px;
    letter-spacing: -1px;
}

.section-heading p,
.about-content p {
    color: var(--muted);
    font-size: 14px;
    margin-top: 12px;
    line-height: 1.8;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 0;
}

.category-btn {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted);
    padding: 11px 18px;
    border-radius: 9px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 12px;
    transition: .2s;
}

.category-btn.active,
.category-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Mikro Etkileşimler (Tıklama ve Hover Efektleri) */
.tool-card {
    padding: 25px;
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease, 
                background 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 12px 30px rgba(40,60,120,.08);
}

.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 23px;
    font-weight: 700;
    margin-bottom: 22px;
}

.purple { background: #f0eaff; color: #8054d9; }
.orange { background: #fff0e5; color: #e98a38; }
.blue { background: #e6f1ff; color: #4385dd; }
.green { background: #e5f8ed; color: #37a56a; }
.pink { background: #ffe9f2; color: #d95d91; }
.yellow { background: #fff6dc; color: #d5a324; }

.tool-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.tool-card p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
    min-height: 42px;
}

.tool-link {
    display: inline-block;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    margin-top: 20px;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: var(--muted);
}

.about-section {
    background: var(--surface);
    padding: 80px 0;
    text-align: center;
    transition: background 0.3s ease;
    position: relative;
    z-index: 1;
}

.about-content {
    max-width: 650px;
    margin: auto;
}

.about-content p {
    max-width: 570px;
    margin: 15px auto 0;
}

.footer {
    border-top: 1px solid var(--border);
    padding: 30px 0;
    transition: border-color 0.3s ease;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer p {
    color: var(--muted);
    font-size: 12px;
}

/* Özel Kaydırma Çubuğu (Custom Scrollbar) */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

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

/* Şık Animasyonlu Sayfa Geçişleri (Fade-in) */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-container {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.calc-btn:active, 
.category-btn:active, 
.tool-card:active,
.copy-btn:active,
.download-btn:active {
    transform: scale(0.98);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 75px 0 65px;
    }

    .hero h1 {
        letter-spacing: -1.5px;
    }

    .hero-info {
        flex-wrap: wrap;
        gap: 12px;
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .tool-card {
        padding: 17px;
    }

    .section-heading h2,
    .about-content h2 {
        font-size: 25px;
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .search-box {
        height: 55px;
    }

    .search-box button {
        padding: 12px;
    }
}

/* Hareketi azaltmak isteyen kullanıcılar için animasyonları kapat */
@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after,
    .bg-symbols span {
        animation: none;
    }
}
