/* ============================================
   Kriptoborsam - Main Stylesheet
   Fonts: Inter, Space Grotesk, JetBrains Mono
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============ CSS Variables ============ */
:root {
    --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
    --font-display: "Space Grotesk", sans-serif;

    --color-brand-primary: #10B981;
    --color-brand-secondary: #6366F1;
    --color-brand-bg: #070A13;

    --color-emerald-400: #34d399;
    --color-emerald-500: #10b981;
    --color-indigo-400: #818cf8;
    --color-indigo-500: #6366f1;
    --color-rose-400: #fb7185;
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;
    --color-slate-950: #020617;
}

/* ============ Reset & Base ============ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #070A13;
    color: #F3F4F6;
    font-family: var(--font-sans);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
    background-color: #10B981;
    color: #020617;
}

/* ============ Scrollbar ============ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0B1120; }
::-webkit-scrollbar-thumb { background: #1E293B; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #334155; }

/* ============ Typography ============ */
.font-display  { font-family: var(--font-display); }
.font-mono     { font-family: var(--font-mono); }
.font-sans     { font-family: var(--font-sans); }

/* ============ Animations ============ */
@keyframes pulse-glow {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50%       { opacity: 0.3;  transform: scale(1.05); }
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); animation-timing-function: cubic-bezier(0.8,0,1,1); }
    50%       { transform: translateY(-10px); animation-timing-function: cubic-bezier(0,0,0.2,1); }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-scale {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes slide-down {
    from { opacity: 0; max-height: 0; }
    to   { opacity: 1; max-height: 500px; }
}

@keyframes ticker-flash-up {
    0%   { background-color: rgba(16,185,129,0.08); }
    100% { background-color: transparent; }
}

@keyframes ticker-flash-down {
    0%   { background-color: rgba(251,113,133,0.08); }
    100% { background-color: transparent; }
}

.animate-pulse-glow  { animation: pulse-glow 4s infinite ease-in-out; }
.animate-pulse       { animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }
.animate-spin        { animation: spin 1s linear infinite; }
.animate-bounce      { animation: bounce 1s infinite; }
.animate-fade-in     { animation: fade-in 0.4s ease-out forwards; }
.animate-fade-in-scale { animation: fade-in-scale 0.4s ease-out forwards; }
.ticker-flash-up     { animation: ticker-flash-up 1.2s ease-out forwards; }
.ticker-flash-down   { animation: ticker-flash-down 1.2s ease-out forwards; }

/* Entry animations for scroll-triggered */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============ Layout Utilities ============ */
.container-fluid {
    max-width: 80rem; /* 1280px */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}
@media (min-width: 640px) {
    .container-fluid { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
    .container-fluid { padding-left: 2rem; padding-right: 2rem; }
}

/* ============ Header Styles ============ */
#site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    transition: all 0.3s ease;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

#site-header.scrolled {
    background-color: rgba(7,10,19,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(30,41,59,0.6);
    padding-top: 1rem;
    padding-bottom: 1rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

/* Mobile Menu */
#mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background-color: #070A13;
    border-bottom: 1px solid rgba(30,41,59,0.8);
    padding: 1rem 1rem 1.5rem;
    backdrop-filter: blur(16px);
}
#mobile-menu.open { display: block; animation: fade-in 0.2s ease-out; }

/* ============ Hero Section ============ */
#hero {
    position: relative;
    padding-top: 8rem;
    padding-bottom: 5rem;
    overflow: hidden;
    background-color: #070A13;
}
@media (min-width: 768px) {
    #hero { padding-top: 10rem; padding-bottom: 8rem; }
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(30,41,59,0.07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(30,41,59,0.07) 1px, transparent 1px);
    background-size: 4rem 4rem;
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 70%, transparent 100%);
    mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 70%, transparent 100%);
    pointer-events: none;
}

.sparkline-path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: draw-line 1.5s ease-out 0.5s forwards;
}
@keyframes draw-line {
    to { stroke-dashoffset: 0; }
}

/* ============ LiveTicker Styles ============ */
#canli-fiyatlar {
    padding: 5rem 0;
    background-color: #0B0F19;
    position: relative;
}

.coin-row {
    transition: background-color 0.5s ease;
}
.coin-row:hover {
    background-color: rgba(15,23,42,0.5);
}
.coin-row.flash-up {
    animation: ticker-flash-up 1.2s ease-out forwards;
}
.coin-row.flash-down {
    animation: ticker-flash-down 1.2s ease-out forwards;
}

.price-value {
    transition: color 0.3s ease;
}
.price-value.up   { color: #34d399; }
.price-value.down { color: #fb7185; }

/* ============ Features Section ============ */
#ozellikler {
    padding: 5rem 0;
    background-color: #070A13;
    position: relative;
}

.feature-card {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(30,41,59,0.8);
    box-shadow: 0 8px 32px rgba(16,185,129,0.02);
}
.feature-card:hover .feature-icon-wrapper {
    border-color: rgba(16,185,129,0.3);
    background-color: rgba(16,185,129,0.03);
}
.feature-card:hover .feature-title {
    color: #6ee7b7;
}

/* ============ Calculator Styles ============ */
#hesaplayici {
    padding: 5rem 0;
    background-color: #070A13;
    position: relative;
    overflow: hidden;
}

/* Range slider custom styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #1e293b;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #10B981;
    cursor: pointer;
    border: 2px solid #020617;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.2);
    transition: box-shadow 0.2s;
}
input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 5px rgba(16,185,129,0.3);
}
input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #10B981;
    cursor: pointer;
    border: 2px solid #020617;
}

/* ============ EasyTrade Styles ============ */
#islem-simulatoru {
    padding: 5rem 0;
    background-color: #0B0F19;
    position: relative;
}

.trade-step-indicator {
    transition: all 0.3s ease;
}

/* ============ FAQ Styles ============ */
#sss {
    padding: 5rem 0;
    background-color: #070A13;
    position: relative;
    overflow: hidden;
}

.faq-item {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.faq-item.open {
    border-color: rgba(16,185,129,0.3);
    box-shadow: 0 8px 32px rgba(16,185,129,0.01);
}

.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease;
    opacity: 0;
}
.faq-body.open {
    max-height: 500px;
    opacity: 1;
}

.faq-chevron {
    transition: transform 0.3s ease, color 0.3s ease;
}
.faq-item.open .faq-chevron {
    transform: rotate(180deg);
    color: #34d399;
}

/* ============ Contact Form ============ */
#iletisim {
    padding: 5rem 0;
    background-color: #0B0F19;
    position: relative;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: #f1f5f9;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: var(--font-sans);
}
.form-input::placeholder { color: #475569; }
.form-input:focus {
    border-color: rgba(16,185,129,0.4);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}
.form-input.error {
    border-color: rgba(251,113,133,0.5);
    box-shadow: 0 0 0 3px rgba(251,113,133,0.1);
}

textarea.form-input { resize: none; }

/* Interest type toggles */
.interest-btn {
    padding: 0.5rem 0.25rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    color: #64748b;
}
.interest-btn:hover { color: #f1f5f9; }
.interest-btn.active {
    background-color: #10B981;
    color: #020617;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(16,185,129,0.2);
}

/* ============ Footer ============ */
footer {
    background-color: #050810;
    border-top: 1px solid rgba(30,41,59,0.8);
    padding-top: 4rem;
    padding-bottom: 2rem;
    color: #64748b;
    font-size: 0.75rem;
    position: relative;
    overflow: hidden;
}

/* ============ Button Styles ============ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #10B981;
    color: #020617;
    font-weight: 700;
    padding: 0.875rem 2rem;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(16,185,129,0.2);
    text-decoration: none;
}
.btn-primary:hover {
    background-color: #34d399;
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(16,185,129,0.3);
}
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #0f172a;
    color: #cbd5e1;
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    border: 1px solid #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.btn-secondary:hover {
    background-color: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background-color: rgba(239,68,68,0.1);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.2);
    padding: 0.5rem 0.875rem;
    border-radius: 0.625rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-danger:hover { background-color: rgba(239,68,68,0.2); }

/* ============ Badge / Tag Styles ============ */
.badge-emerald {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    background-color: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.2);
    color: #34d399;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-indigo {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    background-color: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.2);
    color: #818cf8;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ============ Card Base ============ */
.card {
    background-color: rgba(11,15,25,0.6);
    border: 1px solid rgba(30,41,59,0.8);
    border-radius: 1rem;
    padding: 1.5rem;
}
@media (min-width: 640px) {
    .card { padding: 2rem; }
}

.card-dark {
    background-color: rgba(2,6,23,0.8);
    border: 1px solid #1e293b;
    border-radius: 1rem;
    padding: 1.5rem;
    backdrop-filter: blur(8px);
}

/* ============ Section Titles ============ */
.section-title {
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
    line-height: 1.2;
}
@media (min-width: 640px) {
    .section-title { font-size: 2.25rem; }
}

.section-subtitle {
    color: #94a3b8;
    font-size: 1rem;
    line-height: 1.75;
}

/* ============ Icon Wrapper ============ */
.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background-color: #0f172a;
    border: 1px solid #1e293b;
    transition: all 0.3s ease;
}

/* ============ Glow Blobs ============ */
.glow-emerald {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(16,185,129,0.06);
    filter: blur(100px);
    pointer-events: none;
}
.glow-indigo {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(99,102,241,0.06);
    filter: blur(120px);
    pointer-events: none;
}

/* ============ Alert / Toast ============ */
.alert-success {
    padding: 0.875rem 1rem;
    background-color: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.25);
    border-radius: 0.75rem;
    color: #6ee7b7;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.alert-error {
    padding: 0.875rem 1rem;
    background-color: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: 0.75rem;
    color: #fca5a5;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============ Grid Helpers ============ */
.grid-2  { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem; }

@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-12 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ============ Divider ============ */
.divider {
    height: 1px;
    background-color: rgba(30,41,59,0.6);
    margin: 1.5rem 0;
}

/* ============ Receipt Card (EasyTrade) ============ */
.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(30,41,59,0.4);
    font-size: 0.8125rem;
    font-family: var(--font-mono);
}
.receipt-row:last-child { border-bottom: none; }

/* ============ Admin Panel ============ */
.admin-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.6875rem;
    font-family: var(--font-mono);
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid rgba(30,41,59,0.8);
    background-color: rgba(7,10,19,0.4);
}
.admin-table td {
    padding: 1rem;
    font-size: 0.8125rem;
    border-bottom: 1px solid rgba(30,41,59,0.5);
    vertical-align: middle;
}
.admin-table tr:hover td { background-color: rgba(15,23,42,0.5); }

/* ============ Responsive Utilities ============ */
@media (max-width: 1024px) {
    #site-header nav { display: none; }
    #site-header .header-cta { display: none; }
    #site-header .mobile-menu-btn { display: flex; }
}
@media (min-width: 1024px) {
    #site-header nav { display: flex; }
    #site-header .header-cta { display: flex; }
    #site-header .mobile-menu-btn { display: none; }
    #mobile-menu { display: none !important; }
}

/* ============ Coin symbol circle ============ */
.coin-symbol {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background-color: #0f172a;
    border: 1px solid rgba(30,41,59,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-mono);
    color: #cbd5e1;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* ============ Number input hide arrows ============ */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] { -moz-appearance: textfield; }
