/* ===== AUTH & MODAL ===== */
.auth-modal-overlay {
  display: none; position: fixed; top: 0; left: 0;
  width: 100%; height: 100%; background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px); z-index: 99999;
  justify-content: center; align-items: center; padding: 20px;
}
.auth-modal-overlay.active { display: flex; }
.auth-modal {
  background: #1a1a2e; color: #fff; border-radius: 8px; width: 100%;
  max-width: 420px; position: relative;
  animation: modalSlideIn 0.3s ease; overflow: hidden;
  border-top: 2px solid #00c853;
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-modal-close {
  position: absolute; top: 15px; right: 15px;
  width: 32px; height: 32px; border: none;
  background: none; font-size: 24px; color: #888;
  cursor: pointer; z-index: 10; line-height: 1;
}
.auth-modal-close:hover { color: #fff; }
.auth-logo-wrap { text-align: center; padding: 35px 30px 10px; }
.auth-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.auth-logo-icon {
  width: 50px; height: 50px; background: #00c853;
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-family: 'Rajdhani', sans-serif;
  font-size: 22px; font-weight: 900; color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.auth-logo-text {
  font-family: 'Rajdhani', sans-serif; font-size: 28px;
  font-weight: 700; color: #fff;
}
.auth-subtitle {
  text-align: center; color: #aaa; font-size: 14px;
  padding: 0 30px 20px; margin: 0;
}
.auth-subtitle strong { color: #00c853; }
.auth-form { padding: 0 30px 30px; }
.auth-form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid #2d2d2d; border-radius: 4px;
  overflow: hidden; margin-bottom: 20px;
}
.auth-form-row .auth-input-group { border-right: 1px solid #2d2d2d; }
.auth-form-row .auth-input-group:last-child { border-right: none; }
.auth-input-group {
  display: flex; align-items: center; padding: 12px 15px;
  background: #121212;
}
.auth-input-group svg {
  width: 18px; color: #666; margin-right: 12px; flex-shrink: 0;
}
.auth-input-group input {
  border: none; background: transparent; outline: none;
  font-size: 14px; color: #fff; width: 100%;
}
.auth-input-group input::placeholder { color: #666; }
.auth-input-group.full {
  border: 1px solid #2d2d2d; border-radius: 4px; margin-bottom: 15px;
}
.auth-checkbox-wrap {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 15px; background: #121212;
  border-radius: 4px; margin-bottom: 20px;
  font-size: 12px; color: #aaa;
}
.auth-checkbox-wrap input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: #00c853;
}
.auth-checkbox-wrap a { color: #ff6b35; text-decoration: none; font-weight: 600; }
.auth-submit {
  width: 100%; padding: 14px; border: none; border-radius: 4px;
  background: #00c853; color: #000; font-size: 14px;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; cursor: pointer; transition: background 0.2s;
}
.auth-submit:hover { background: #00b248; }
.auth-footer {
  text-align: center; padding: 15px 30px 25px;
  background: #121212; font-size: 12px;
}
.auth-footer a { color: #888; text-decoration: none; }
.auth-footer a:hover { color: #00c853; }
.auth-toggle {
  text-align: center; margin-top: 15px;
  font-size: 13px; color: #aaa;
}
.auth-toggle a { color: #00c853; text-decoration: none; font-weight: 600; }
.auth-toggle a:hover { text-decoration: underline; }

/* ===== ALERTS ===== */
.auth-alert {
  margin: 0 30px 20px;
  padding: 12px 15px;
  border-radius: 4px;
  font-size: 13px;
  display: none;
}
.auth-alert.loading {
  display: block;
  background: rgba(33, 150, 243, 0.1);
  border-left: 4px solid #2196f3;
  color: #64b5f6;
}
.auth-alert.success {
  display: block;
  background: rgba(0, 200, 83, 0.1);
  border-left: 4px solid #00c853;
  color: #00ff88;
}
.auth-alert.error {
  display: block;
  background: rgba(244, 67, 54, 0.1);
  border-left: 4px solid #f44336;
  color: #ff6b6b;
}

/* ===== AVATAR UPLOAD ===== */
.auth-avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
}
.avatar-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    gap: 0.75rem;
    transition: transform 0.2s ease;
    position: relative;
}
.avatar-label:hover {
    transform: translateY(-2px);
}
.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 3px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.avatar-label:hover .avatar-preview {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow:
        0 8px 30px rgba(99, 102, 241, 0.2),
        0 0 0 2px rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.default-avatar {
    font-size: 2.5rem;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}
.avatar-label:hover .default-avatar {
    opacity: 1;
}
.avatar-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}
.avatar-label:hover .avatar-preview::after {
    opacity: 1;
}
.avatar-preview::before {
    content: '📷';
    position: absolute;
    z-index: 2;
    font-size: 1.5rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.avatar-label:hover .avatar-preview::before {
    opacity: 1;
    transform: scale(1);
}
.upload-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}
.avatar-label:hover .upload-text {
    color: rgba(255, 255, 255, 0.8);
}
.auth-avatar-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.avatar-preview.has-image {
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow:
        0 4px 20px rgba(34, 197, 94, 0.15),
        0 0 0 2px rgba(34, 197, 94, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.avatar-preview.has-image::after {
    display: none;
}
.avatar-preview.has-image::before {
    content: '✏️';
    opacity: 0;
}
.avatar-label:hover .avatar-preview.has-image::before {
    opacity: 1;
}
@keyframes avatarPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.avatar-preview.uploading {
    animation: avatarPulse 1s ease-in-out infinite;
    border-color: rgba(99, 102, 241, 0.8);
}

/* ===== SEARCH DROPDOWN ===== */
.nav-search { position: relative; }
.search-autocomplete-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #121212; border: 1px solid #2d2d2d;
  border-radius: 6px; max-height: 380px; overflow-y: auto;
  z-index: 99999; box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  margin-top: 8px; display: none;
}
.search-dropdown-item {
  display: flex; align-items: center; padding: 10px 12px;
  text-decoration: none; color: #fff !important;
  border-bottom: 1px solid #1a1a1a; transition: background 0.2s;
}
.search-dropdown-item:hover { background: #1f1f1f; }
.search-dropdown-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; margin-right: 12px; border: 1px solid #333; flex-shrink: 0; }
.search-dropdown-item .info { display: flex; flex-direction: column; overflow: hidden; }
.search-dropdown-item .title { font-size: 13px; font-weight: 700; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.search-dropdown-item .category { font-size: 10px; padding: 2px 6px; background: #252525; color: #ffcc00; text-transform: uppercase; font-weight: bold; margin-top: 5px; border-radius: 3px; align-self: flex-start; border: 1px solid #3d3d3d; }
.no-results-item { padding: 15px; color: #777; text-align: center; font-size: 13px; }

/* ===== SHAKE ===== */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}
.shake-error {
    animation: shake 0.5s ease-in-out !important;
}
.auth-input-group.shake-error {
    animation: shake 0.5s ease-in-out;
    transition: background 0.3s, border-color 0.3s;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 480px) {
  .auth-form-row { grid-template-columns: 1fr; }
  .auth-form-row .auth-input-group {
    border-right: none; border-bottom: 1px solid #2d2d2d;
  }
  .auth-form-row .auth-input-group:last-child { border-bottom: none; }
}
.mobile-nav {
    display: none; /* Sakrij po defaultu */
    z-index: 100000; /* Povećaj z-index */
}

.mobile-nav.open {
    display: block; /* Prikaži kada je otvoren */
}

.mobile-nav-overlay {
    display: none; /* Sakrij po defaultu */
    z-index: 100000; /* Povećaj z-index */
}

.mobile-nav-overlay.open {
    display: block; /* Prikaži kada je otvoren */
}
