/* ========== GENEL ========== */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background: #fff;
  color: #333;
  display: flex;
  flex-direction: column;
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

header, footer {
  background: #444;
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#logo {
  background-color: white;
  border-radius: 10px;
  width: 100%;
  max-width: 250px;   
  height: auto;       
  display: block;
}

#headername { display: none; }

.controls button {
  margin-left: 10px;
  padding: 5px 10px;
  cursor: pointer;
}

main {
  display: flex;
  flex: 1;
}

footer {
  text-align: center;
}

/* ========== TOOL KARTLARI ========== */
.tool-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  padding: 1.2rem;
  border-radius: 12px;
  background: #fafafa;
  color: #333;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.tool-card svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  opacity: 0.85;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.tool-card small {
  font-size: 0.8rem;
  color: #777;
  font-weight: 400;
}

.tool-card:hover {
  background: #fff;
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  color: #0073e6;
}

.tool-card:hover svg {
  transform: scale(1.15) rotate(-5deg);
  opacity: 1;
}

@media (max-width:600px){
  .tool-list { grid-template-columns: 1fr; }
  .tool-card { font-size: 1.1rem; }
}

/* ========== DARK MODE ========== */
body.dark {
  background: #222;
  color: #eee;
}
body.dark header, 
body.dark footer {
  background: #111;
}
body.dark .tool-card {
  background:#2a2a2a; 
  color:#eee;
}
body.dark .tool-card small {
  color:#bbb;
}
body.dark .tool-card:hover {
  background:#333;
  color:#4cd964;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}
body.dark .tool-card svg {
  opacity: 0.9;
}
body.dark .tool-card:hover svg {
  fill: #4cd964;
}

/* ========== FORM ALANLARI ========== */
input, textarea, button, select {
  padding: 0.5rem;
  margin: 0.5rem 0;
  font-family: inherit;
}

textarea {
  width: 100%;
  min-height: 120px;
}

/* ========== BUTONLAR ========== */
button, .format-buttons button {
  transition: transform 0.15s ease, background-color 0.3s ease;
}
button:hover, .format-buttons button:hover {
  transform: scale(1.05);
}
button:active, .format-buttons button:active {
  transform: scale(0.96);
}

/* ========== DARK MODE GEÇİŞ ANİMASYONU ========== */
body, .tool-card, header, footer, .converter-box {
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* ========== REKLAM ALANLARI ========== */
.ad-space {
  width: 15%;
  background: #f0f0f0;
  text-align: center;
  padding: 1rem;
}

.content {
  flex: 1;
  padding: 2rem;
}

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

/* ========== TOOLTIP (OK EKLENDİ) ========== */
[data-tip] {
  position: relative;
  cursor: pointer;
}

[data-tip]::after,
[data-tip]::before {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(.2,.8,.4,1);
}

/* Balon */
[data-tip]::after {
  content: attr(data-tip);
  bottom: 120%;
  background: #333;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Küçük üçgen ok */
[data-tip]::before {
  content: "";
  bottom: 113%;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

/* Hover olduğunda görünür */
[data-tip]:hover::after,
[data-tip]:hover::before,
[data-tip]:focus::after,
[data-tip]:focus::before {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px) scale(1);
}

body.dark [data-tip]::after {
  background: #eee;
  color: #222;
}
body.dark [data-tip]::before {
  border-color: #eee transparent transparent transparent;
}
