/* --- THEME VARIABLES --- */
:root {
  --bg-color: #fcaecb;
  --container-bg: #ffe4f0;
  --box-bg: #fff0f7;
  --text-color: #4a2e35;
  --border-color: #f7a8c4;
  --accent-color: #ff6b9d;
  --header-bg: #ffd1e4;
  --title-color: #d6336c;
  --link-color: #c2255c;
  --shadow-color: rgba(214, 51, 108, 0.15);
}

[data-theme="dark"] {
  --bg-color: #2b1720;
  --container-bg: #3d212d;
  --box-bg: #4a2a38;
  --text-color: #fce7f0;
  --border-color: #7a3e56;
  --accent-color: #ff85b3;
  --header-bg: #52293b;
  --title-color: #ff9dcc;
  --link-color: #ff85b3;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

.phone-container {
  position: relative;
  width: 240px;
  height: 420px;
  background: url('phone.jpg') no-repeat center center; /* PNG uzantılı dosya */
  background-size: contain;
  margin: 10px auto;
}

.phone-screen {
  position: absolute;
  top: 55px;
  left: 21px;
  width: 198px;
  height: 156px;
  overflow: hidden;
  border-radius: 6px;
}

.phone-screen iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* --- BASE STYLES & PATTERN BACKGROUND --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  background-image: url('bg.jpg'); /* Arkaplan Görselin */
  background-repeat: repeat;
  background-attachment: fixed;
  color: var(--text-color);
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  line-height: 1.6;
  transition: all 0.3s ease;
  padding: 20px 10px;
}

/* --- LAYOUT CONTAINER --- */
.site-wrapper {
  max-width: 960px;
  margin: 0 auto;
  background: var(--container-bg);
  border: 3px double var(--border-color);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 8px 25px var(--shadow-color);
}

/* --- TOP BAR --- */
.top-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.theme-btn {
  background: var(--box-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 4px 10px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
}

/* --- HEADER --- */
.header {
  text-align: center;
  background: var(--header-bg);
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 20px 10px;
  margin-bottom: 15px;
}

.sparkles-text {
  font-size: 11px;
  color: var(--accent-color);
}

.glitter-title {
  font-size: 26px;
  color: var(--title-color);
  margin: 5px 0;
}

.subtitle {
  font-style: italic;
  font-size: 12px;
  opacity: 0.9;
}

.header-decor {
  margin-top: 5px;
}

/* --- 3 COLUMN GRID --- */
.layout {
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  gap: 15px;
}

@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

/* --- BOXES --- */
.box {
  background: var(--box-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 15px;
  box-shadow: 2px 2px 5px var(--shadow-color);
}

.box-title {
  font-weight: bold;
  color: var(--title-color);
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 4px;
  margin-bottom: 10px;
  text-align: center;
}

/* --- NAVIGATION --- */
.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav a {
  color: var(--link-color);
  text-decoration: none;
  font-weight: bold;
  padding: 3px 6px;
  border-radius: 4px;
  transition: background 0.2s;
}

.nav a:hover {
  background: var(--header-bg);
}

/* --- STATUS & TAMAGOTCHI --- */
.status-dot {
  color: #40c057;
}

.status-msg {
  font-size: 11px;
  margin-top: 4px;
}

.tamagotchi-screen {
  background: rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
  text-align: center;
  margin-bottom: 8px;
}

.tama-pet {
  font-size: 18px;
  margin-bottom: 4px;
}

.tama-status {
  font-size: 10px;
}

.tama-buttons {
  display: flex;
  justify-content: space-between;
  gap: 2px;
}

.tama-buttons button {
  background: var(--header-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 10px;
  padding: 3px 4px;
  border-radius: 4px;
  cursor: pointer;
  flex: 1;
}

/* --- CALENDAR --- */
.cal-month {
  text-align: center;
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 11px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10px;
  gap: 2px;
}

.cal-today {
  background: var(--accent-color);
  color: #fff;
  border-radius: 50%;
  font-weight: bold;
}

/* --- MAIN CONTENT & WELCOME --- */
.welcome-decor, .sparkles-line {
  text-align: center;
  color: var(--accent-color);
  margin: 8px 0;
  font-size: 11px;
}

.welcome-text {
  font-size: 14px;
  margin-bottom: 8px;
}

.intro-body {
  margin-bottom: 10px;
  text-align: justify;
}

.player-wrapper {
  margin-top: 5px;
  border-radius: 8px;
  overflow: hidden;
}

/* --- CONSTRUCTION BOX --- */
.construction-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.progress-bar {
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
  height: 16px;
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid var(--border-color);
}

.progress-fill {
  background: var(--accent-color);
  height: 100%;
  color: white;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* --- MOON PHASE & BLINKIES --- */
.moon-display {
  text-align: center;
  margin-top: 5px;
}

.moon-icon {
  font-size: 24px;
}

.moon-name {
  font-size: 11px;
}

.webring-text {
  text-align: center;
  font-size: 11px;
  margin-bottom: 5px;
}

.webring-links {
  display: flex;
  justify-content: space-around;
  font-size: 10px;
}

.webring-links a {
  color: var(--link-color);
  text-decoration: none;
}

.blinkie-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stamp-pill {
  background: var(--header-bg);
  border: 1px dashed var(--border-color);
  text-align: center;
  padding: 4px;
  font-size: 10px;
  font-weight: bold;
  border-radius: 4px;
}

/* --- FOOTER --- */
.footer {
  text-align: center;
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
  font-size: 11px;
}

.footer .heart {
  color: var(--accent-color);
}

/* --- MODALS (POP-UPS) --- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--container-bg);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  padding: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-large {
  max-width: 650px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 12px;
  font-weight: bold;
  color: var(--title-color);
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 14px;
  cursor: pointer;
}

.diary-entry {
  margin-bottom: 10px;
}

.diary-entry .date {
  font-weight: bold;
  color: var(--accent-color);
  font-size: 11px;
  margin-bottom: 3px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.art-card {
  background: var(--box-bg);
  border: 1px solid var(--border-color);
  padding: 20px 10px;
  text-align: center;
  border-radius: 6px;
  font-size: 11px;
}

/* --- TAROT --- */
.section-sub {
  text-align: center;
  font-size: 11px;
  margin-bottom: 12px;
}

.tarot-three-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.tarot-card {
  height: 140px;
  perspective: 1000px;
  cursor: pointer;
}

.tarot-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.tarot-card.flipped .tarot-inner {
  transform: rotateY(180deg);
}

.tarot-front, .tarot-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  font-size: 11px;
}

.tarot-front {
  background: var(--header-bg);
  color: var(--title-color);
  font-weight: bold;
}

.tarot-back {
  background: var(--box-bg);
  transform: rotateY(180deg);
  font-size: 10px;
}