/*
Theme Name: LoadingHub
Theme URI: https://loadinghub.com
Author: LoadingHub
Author URI: https://loadinghub.com
Description: Free CSS Loading Animations sitesi. Kullanıcılar animasyonları önizleyip CSS veya SVG olarak indirebilir.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: loadinghub
Tags: loading, animation, css, tools
*/

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

:root {
  --primary: #534AB7;
  --primary-light: #EEEDFE;
  --primary-dark: #3C3489;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --bg: #f8f7ff;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* =============================
   NAVBAR
   ============================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.site-logo { font-size: 20px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.site-logo span { color: var(--text); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--text-muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }

/* =============================
   HERO
   ============================= */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
  background: linear-gradient(135deg, #f0eeff 0%, #e8f4ff 100%);
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 800; color: var(--text);
  letter-spacing: -1px; margin-bottom: 16px;
}
.hero h1 span { color: var(--primary); }
.hero p { font-size: 18px; color: var(--text-muted); margin-bottom: 28px; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-stats { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.hero-stats span {
  background: white; border: 1px solid var(--border);
  padding: 8px 18px; border-radius: 50px;
  font-size: 14px; font-weight: 500;
}
.hero-cta {
  display: inline-block;
  background: var(--primary); color: white;
  padding: 14px 32px; border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 600;
  transition: opacity 0.2s;
}
.hero-cta:hover { opacity: 0.85; color: white; }

/* =============================
   SECTIONS
   ============================= */
.section { padding: 80px 0; }
.section-alt { background: white; }
.section-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.5px; }
.section-sub { color: var(--text-muted); font-size: 16px; margin-bottom: 40px; }

/* =============================
   GENERATOR
   ============================= */
.generator-wrap {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 768px) {
  .generator-wrap { grid-template-columns: 1fr; }
}

.controls-panel {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 80px;
}
.control-group { display: flex; flex-direction: column; gap: 10px; }
.control-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px;
  display: flex; justify-content: space-between; align-items: center;
}
.control-label span { font-size: 13px; font-weight: 700; color: var(--primary); text-transform: none; letter-spacing: 0; }

.anim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.anim-btn {
  padding: 8px 4px; font-size: 11px; font-weight: 500;
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.15s; color: var(--text); font-family: inherit;
}
.anim-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.anim-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

input[type="color"] {
  width: 100%; height: 40px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; padding: 3px;
  background: white;
}
input[type="range"] { width: 100%; accent-color: var(--primary); cursor: pointer; }

/* PREVIEW */
.preview-panel { display: flex; flex-direction: column; gap: 16px; }

.preview-stage {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 200px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.preview-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
  background-size: 20px 20px; opacity: 0.6;
}
.preview-anim { position: relative; z-index: 1; }

.preview-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-primary {
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  background: var(--primary); color: white; border: none;
  border-radius: var(--radius-sm); cursor: pointer; font-family: inherit;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.85; }
.btn-secondary {
  padding: 10px 20px; font-size: 14px; font-weight: 500;
  background: white; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.code-box {
  background: #1e1e2e; color: #cdd6f4;
  border-radius: var(--radius); padding: 20px;
  font-family: 'Courier New', monospace;
  font-size: 12px; line-height: 1.7;
  max-height: 260px; overflow-y: auto;
  white-space: pre;
}

/* TOAST */
.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1D9E75; color: white;
  padding: 12px 28px; border-radius: 50px;
  font-size: 14px; font-weight: 600;
  transition: transform 0.3s ease;
  z-index: 9999; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* =============================
   GALLERY
   ============================= */
.filter-bar { display: flex; gap: 8px; margin-bottom: 32px; flex-wrap: wrap; }
.filter-btn {
  padding: 8px 18px; font-size: 13px; font-weight: 500;
  background: white; border: 1px solid var(--border);
  border-radius: 50px; cursor: pointer;
  transition: all 0.2s; color: var(--text); font-family: inherit;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--primary); color: white; border-color: var(--primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.gallery-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 12px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  cursor: pointer; transition: all 0.2s; position: relative;
}
.gallery-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(83,74,183,0.1);
  transform: translateY(-2px);
}
.gallery-card .card-label { font-size: 12px; color: var(--text-muted); font-weight: 500; text-align: center; }
.gallery-card .card-tag {
  position: absolute; top: 8px; right: 8px;
  font-size: 10px; font-weight: 600; padding: 2px 7px;
  background: var(--primary-light); color: var(--primary);
  border-radius: 50px;
}
.card-stage { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; }

/* =============================
   HOW TO
   ============================= */
.howto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.howto-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.howto-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.howto-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.howto-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* =============================
   FOOTER
   ============================= */
.site-footer {
  background: #1a1a2e; color: #9ca3af;
  padding: 40px 0; margin-top: 0;
}
.footer-inner {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer-logo { font-size: 18px; font-weight: 800; color: #a78bfa; }
.site-footer p { font-size: 14px; }

/* =============================
   ANIMATIONS (keyframes)
   ============================= */
@keyframes lh-spin { to { transform: rotate(360deg); } }
@keyframes lh-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-12px); }
}
@keyframes lh-pulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}
@keyframes lh-bar {
  0%, 100% { height: 10px; }
  50% { height: 36px; }
}
@keyframes lh-ripple {
  0% { width: 0; height: 0; opacity: 1; }
  100% { width: 50px; height: 50px; opacity: 0; }
}
@keyframes lh-morph {
  0%, 100% { border-radius: 4px; transform: rotate(0deg); }
  25% { border-radius: 50%; }
  50% { border-radius: 4px; transform: rotate(180deg); }
  75% { border-radius: 50%; }
}
@keyframes lh-progress {
  0% { transform: translateX(-150%); }
  100% { transform: translateX(400%); }
}
@keyframes lh-flip {
  0%, 100% { transform: perspective(120px) rotateX(0deg); }
  50% { transform: perspective(120px) rotateX(-180deg); }
}
@keyframes lh-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes lh-typing {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}
