body {
  margin: 0;
  font-family: "Gill Sans", sans-serif;
  background: #181f2a;
  color: #e3eaf5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
header {
  background: #232b39;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
}
.logo a {
  text-decoration: none;
  color: #6cb2ff;
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}
.nav-links li a {
  text-decoration: none;
  color: #e3eaf5;
  font-size: 1rem;
  transition: color 0.2s, background 0.2s;
  padding: 0.4rem 1rem;
  border-radius: 6px;
}
.nav-links li a:hover, .nav-links li a.active {
  background: #29344a;
  color: #6cb2ff;
}
.btn {
  background: #6cb2ff;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
  margin-left: 0.5rem;
  transition: background 0.2s;
}
.btn-outline {
  background: transparent;
  color: #6cb2ff;
  border: 1.5px solid #6cb2ff;
}
.btn:hover, .btn-outline:hover {
  background: #5397d6;
  color: #fff;
}
.welcome-box {
  background: #5397d6;
  color: #232b39 !important;
  border-radius: 16px;
  padding: 2.5rem 1.5rem 2rem 1.5rem;
  margin: 2rem 0 2.5rem 0;
  text-align: center;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
.welcome-box h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, #2196f3 0%, #d363ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
.welcome-box p {
  color: #dddddd !important;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  font-family: 'Roboto', sans-serif, Helvetica, Arial !important;
}
.photo-feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
  gap: 1.5rem;
}
.photo-card {
  background: #fff !important;
  color: #232b39 !important;
  border-radius: 12px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  margin-bottom: 1rem;
}
.photo-card-profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 12px;
    border: 3px solid #4f8cff;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #181c27;
    aspect-ratio: 1/1;
}
.photo-card-profile-img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    border-radius: 50%;
    display: block;
    aspect-ratio: 1/1;
    background: #181c27;
}
.photo-meta {
  color: #232b39 !important;
}
main {
  flex: 1;
}
/* Footer klasik şekilde, position özelliği olmadan */
footer {
  background: #232b39;
  color: #b3c2d6;
  text-align: center;
  padding: 1rem 0;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
  font-size: 1rem;
  /* position: fixed; */
  /* position: absolute; */
  /* bottom: 0; */
  /* width: 100%; */
}
.menu-icon {
  display: none;
  font-size: 2rem;
  cursor: pointer;
}
#menu-toggle {
  display: none;
}
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links {
    flex-direction: column;
    width: 100%;
    display: none;
    background: #232b39;
    position: absolute;
    top: 60px;
    left: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
  #menu-toggle:checked + .menu-icon + .nav-links {
    display: flex;
  }
  .menu-icon {
    display: block;
  }
  .welcome-box {
    padding: 1.2rem 0.5rem 1.2rem 0.5rem;
  }
  .header-nav {
    pointer-events: none;
    opacity: 0;
    transform: translateY(-30px);
    transition: transform 0.35s cubic-bezier(0.4,0.2,0.2,1), opacity 0.35s;
  }
  .header-nav.show {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 800px) {
  .header-inner {
    padding: 0 12px;
    height: 62px;
  }
  .logo {
    font-size: 1.4rem;
  }
  .header-nav {
    position: fixed; /* DİKKAT: absolute değil, fixed olmalı */
    top: 62px;
    right: 0;
    left: 0;
    background: rgba(35, 41, 58, 0.55);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    flex-direction: column;
    align-items: flex-start;
    width: 100vw;
    padding: 18px 0 18px 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
    display: none;
    gap: 0;
    z-index: 2001;
  }
  .header-nav.show {
    display: flex !important;
  }
  .header-nav a, .upload-btn {
    width: 100%;
    text-align: left;
    margin: 0;
    border-radius: 0;
    padding: 12px 24px;
    font-size: 1.05rem;
  }
  .upload-btn {
    margin-left: 0;
    margin-top: 8px;
  }
  .hamburger {
    display: flex;
    z-index: 2003;
  }
}

/* Modern form stilleri */
.auth-form {
  background: #fff;
  color: #232b39;
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  max-width: 400px;
  margin: 3rem auto 2rem auto;
  padding: 2.5rem 2rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.auth-form h2 {
  color: #2196f3;
  margin-bottom: 1.2rem;
  text-align: center;
}
.auth-form label {
  font-weight: 500;
  margin-bottom: 0.3rem;
  color: #232b39;
}
.auth-form input[type="text"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1.5px solid #b3c2d6;
  border-radius: 6px;
  font-size: 1rem;
  margin-bottom: 0.7rem;
  background: #f7faff;
  color: #232b39;
  transition: border 0.2s;
}
.auth-form input[type="text"]:focus,
.auth-form input[type="password"]:focus {
  border: 1.5px solid #2196f3;
  outline: none;
}
.auth-form .btn {
  width: 100%;
  margin: 0.5rem 0 0 0;
  font-size: 1.1rem;
}
.auth-form .error {
  background: #ffeaea;
  color: #c0392b;
  border-radius: 6px;
  padding: 0.7rem 1rem;
  margin-bottom: 0.7rem;
  text-align: center;
}
.auth-form p {
  text-align: center;
  margin-top: 1rem;
  font-size: 1rem;
}
.auth-form a {
  color: #2196f3;
  text-decoration: underline;
}
.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 48px;
    width: 100%;
}
@media (max-width: 1200px) {
    .photo-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .photo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
    .photo-grid { grid-template-columns: 1fr !important; }
}
.photo-card-home {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}
.photo-card-home-desc {
    font-size: 1.04rem;
    color: #bfc9e0;
    margin-bottom: 14px;
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.8em;
    line-height: 1.4em;
    white-space: normal;
}

/* Tüm sayfa için taşmayı engelle */
html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Ana kapsayıcılar için taşmayı engelle */
body > *,
.main-container,
.admin-container,
.photo-detail-container,
.photo-grid,
.comment-section {
    box-sizing: border-box;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Mobilde padding ve marginleri azalt */
@media (max-width: 600px) {
    .main-container,
    .admin-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
    .photo-grid {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
    .photo-card-home-bottom {
        flex-direction: column;
        gap: 2px;
    }
    .welcome-box {
        padding-left: 28px;
        padding-right: 28px;
        max-width: 100%;
        box-sizing: border-box;
        margin-left: 16px;
        margin-right: 16px;
    }
    .upload-form-modern {
        margin-top: 80px; /* Header ile kutu arasına boşluk ekle */
        margin-left: 12px;
        margin-right: 12px;
        padding-left: 10px;
        padding-right: 10px;
    }
    .auth-form {
        margin-top: 80px !important; /* Header ile kutu arasına boşluk */
        margin-bottom: 2rem;
        margin-left: 12px;
        margin-right: 12px;
        padding-left: 10px;
        padding-right: 10px;
    }
}

body, .photo-card, .photo-card-home, .photo-card-meta-row, .photo-card-title, .photo-card-home-desc, .photo-card-like-row, .photo-card-content-row, .photo-card-profile-avatar, .photo-card-title-desc, .photo-meta, .btn, .comment, .comment-content, .comment-author, .comment-date, .comment-like, .comment-form, .comment-form input, .comment-form textarea, .comment-form button {
    font-family: 'Roboto', sans-serif, Helvetica, Arial !important;
}

.photo-card-meta-row span:nth-child(2) {
  word-break: break-word;
  white-space: normal;
  display: inline-block;
  max-width: 110px;
  vertical-align: top;
}