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

@layer base {
  body {
    @apply antialiased text-on-surface bg-background;
  }
}

@layer utilities {
  .scrollbar-hide::-webkit-scrollbar {
      display: none;
  }
  .scrollbar-hide {
      -ms-overflow-style: none;
      scrollbar-width: none;
  }
}

/* Core Font & Icon Utilities */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    line-height: 1;
}
.glass-panel {
    background: rgba(31, 32, 32, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.no-line-rule { border: none !important; }
.tonal-shift { background-color: rgba(189, 147, 249, 0.05); }

/* AI Sphere Visuals (3D Canvas) */
.hero-3d-container {
    perspective: 2000px;
}
.ai-eye-wrap {
    width: 600px;
    height: 600px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.2s cubic-bezier(0.1, 0, 0.3, 1);
}
#eye-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
}

/* Structured Core Styles - Enhanced for Dazzling Effect */
.eye-core-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(0);
    width: 320px;
    height: 320px;
    z-index: 2;
    pointer-events: none;
}
.orb-layer {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgb(163, 157, 255, 0.7), rgb(0, 196, 255, 0.5), rgba(154, 95, 253, 0.5), rgb(0, 46, 196, 1));
    border: 1px solid rgb(163, 157, 255, 0.9);
    backdrop-filter: blur(8px);
    box-shadow:
        0 0 40px rgba(189, 147, 249, 0.5),
        0 0 100px rgba(97, 231, 248, 0.27),
        inset 0 0 60px rgba(255, 255, 255, 0.3);
}
.orb-layer-inner {
    position: absolute;
    inset: 10%;
    border-radius: 50%;
    background: linear-gradient(135deg, #bd93f9, #00c4ff, #00ff77, #ffffff);
    filter: blur(30px);
    opacity: 0.5;
    transition: all 0.3s ease;
    box-shadow: 0 0 50px #bd93f9;
}
.orb-ring {
    position: absolute;
    inset: -35px;
    border: 3px dashed rgba(139, 233, 253, 0.7);
    border-radius: 50%;
    opacity: 0.3;
    animation: spin 15s linear infinite;
}
.orb-ring-2 {
    position: absolute;
    inset: -70px;
    border: 2px solid rgba(189, 147, 249, 0.5);
    border-radius: 50%;
    transform: rotateX(75deg);
    animation: spin-reverse 20s linear infinite;
}

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

/* Enhanced Alert Mode */
.alert-mode .orb-layer {
    background: radial-gradient(circle at 30% 30%, rgb(243, 182, 102), rgba(255, 184, 108, 0.8));
    border-color: rgba(231, 108, 31, 0.6);
    box-shadow:
        -20px 20px 60px rgba(255, 85, 85, 1),
        -20px 20px 120px rgba(255, 184, 108, 0.6),
        inset 10px 10px 40px rgba(255, 255, 255, 0.4);
}
.alert-mode .orb-layer-inner {
    background: linear-gradient(135deg, #ff5555, #ffb86c, #ffffff);
    opacity: 1;
    filter: blur(25px);
    box-shadow: 0 0 60px #ff5555;
}
.alert-mode .orb-ring { border-color: rgba(255, 85, 85, 0.8); }
.alert-mode .orb-ring-2 { border-color: rgba(255, 184, 108, 0.6); }


/* ====================================================================
   ARTICLE CODE BLOCKS — Dracula Terminal Style
   CKEditor codesnippet çıktısını (<pre><code>) otomatik olarak
   terminal görünümüne dönüştürür. JS ile header eklenir.
   ==================================================================== */

/* Sarmalayıcı (JS tarafından eklenir) */
.code-block-wrapper {
    margin: 3rem 0;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #44475a;
    background-color: #282a36;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Terminal başlık çubuğu (3 nokta + dosya adı) */
.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: #1e1f29;
    border-bottom: 1px solid #44475a;
}
.code-block-dots {
    display: flex;
    gap: 0.375rem;
}
.code-block-dots span {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
}
.code-block-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6272a4;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

/* Sarmalayıcı içindeki pre/code sıfırlama */
.code-block-wrapper pre {
    margin: 0;
    padding: 1.5rem 2rem;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow-x: auto;
}
.code-block-wrapper pre code {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    line-height: 1.75;
    background: transparent;
    padding: 0;
}

/* Highlight.js varsayılan arka planını eziyoruz */
.code-block-wrapper pre code.hljs {
    background: transparent;
    padding: 0;
}

/* JS çalışmadan önce de asgari güzel görünmesi için fallback */
article > pre {
    margin: 3rem 0;
    padding: 1.5rem 2rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    border: 1px solid #44475a;
    background-color: #282a36;
    color: #f8f8f2;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    line-height: 1.75;
}

@media (min-width: 768px) {
    .code-block-wrapper pre {
        padding: 2rem;
    }
    .code-block-label {
        font-size: 0.75rem;
    }
}

/* ====================================================================
   ARTICLE INLINE IMAGES — Responsive & Centered
   Makale içeriğindeki resimleri (img.article-img) otomatik olarak
   ekran genişliğine göre küçültür ve ortalar.
   ==================================================================== */

img.article-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2.5rem auto;
    border-radius: 0.75rem;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.25);
}

figcaption.article-caption {
    text-align: center;
    font-size: 0.875rem;
    color: rgba(228, 226, 225, 0.6);
    margin-top: -1.5rem;
    margin-bottom: 2.5rem;
    font-style: italic;
}