* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow: auto;
}

/* Top Navigation */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background-color: transparent;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 30px;
}

.topnav .logo-container {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-right: 20px;
}

.topnav .logo {
  height: 45px;
  width: auto;
  object-fit: contain;
}

.topnav .search-container {
  flex: 1;
  max-width: 500px;
  position: relative;
  margin: 0 auto;
}

.topnav .register-btn {
  flex-shrink: 0;
  margin-left: 20px;
}

.topnav .filter-btn {
  flex-shrink: 0;
  margin-left: 12px;
  padding: 12px 24px;
  background-color: #ffffff;
  color: #555;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s;
}

.topnav .filter-btn:hover {
  background-color: #f5f5f5;
}

.filter-btn-icon {
  font-size: 16px;
  line-height: 1;
}

@media (max-width: 768px) {
  .topnav {
    padding: 0 15px;
  }
  
  .topnav .logo-container {
    display: none;
  }
  
  .topnav .search-container {
    max-width: none;
    min-width: 0;
  }
  
  .topnav .filter-btn {
    margin-left: 8px;
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .filter-panel {
    right: 15px;
    width: calc(100% - 30px);
    max-width: 280px;
  }
  
  .topnav .register-btn {
    margin-left: 10px;
    padding: 10px 16px;
    font-size: 13px;
  }
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-height: 260px;
  overflow-y: auto;
  z-index: 1100;
}

.search-results.hidden {
  display: none;
}

.search-result-item {
  padding: 10px 12px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #eee;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: #f5f5f5;
}

.search-result-image {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-placeholder {
  font-size: 24px;
}

.search-result-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.search-result-title {
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-address {
  font-size: 12px;
  color: #777;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-status {
  flex-shrink: 0;
  font-weight: 600;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 12px;
  background-color: rgba(0,0,0,0.05);
  white-space: nowrap;
}

.topnav input[type="text"] {
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  outline: none;
  background-color: white;
}

.topnav .register-btn {
  padding: 12px 24px;
  background-color: #756a56;
  color: white;
  border: 2px solid #a2bd99;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: background-color 0.3s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topnav .register-btn:hover {
  background-color: #5f5645;
}

.register-btn-icon {
  font-size: 18px;
  line-height: 1;
}

.filter-panel {
  position: fixed;
  top: 72px;
  right: 30px;
  width: 280px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  padding: 20px;
  z-index: 1200;
  font-size: 13px;
}

.filter-panel.hidden {
  display: none;
}

.filter-panel h3 {
  margin: 0 0 18px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.filter-section {
  margin-bottom: 18px;
}

.filter-section:last-child {
  margin-bottom: 0;
}

.filter-section-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 10px;
  color: #444;
}

.filter-price-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-price-btn {
  width: 100%;
  padding: 10px 14px;
  background-color: #f8f9fa;
  color: #555;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.filter-price-btn:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

.filter-price-btn.active {
  background-color: #756a56;
  color: #fff;
  border-color: #756a56;
}

.filter-checkbox,
.filter-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.2s;
}

.filter-checkbox:hover,
.filter-radio:hover {
  color: #333;
}

.filter-checkbox input[type="checkbox"],
.filter-radio input[type="radio"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #756a56;
}

.filter-radio {
  margin-bottom: 6px;
}

.filter-radio:last-child {
  margin-bottom: 0;
}

/* Map */
#map {
  width: 100%;
  height: 100vh;
}

/* Floating Button */
.floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: #756a56;
  border: 2px solid #a2bd99;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 999;
  transition: all 0.3s ease;
  padding: 0;
}

.floating-btn-icon {
  font-size: 20px;
  line-height: 1;
}

.floating-btn-text {
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.floating-btn:hover {
  background-color: #5f5645;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.floating-btn:active {
  transform: scale(0.95);
}

@media (max-width: 768px) {
  .floating-btn {
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
  }
  
  .floating-btn-icon {
    font-size: 18px;
  }
  
  .floating-btn-text {
    font-size: 10px;
  }
}

/* Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #8b7355;
  background-image: url('duchonkus.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 20px;
}

.login-box {
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 400px;
}

.login-logo {
  width: 100%;
  max-width: 200px;
  margin: 0 auto 20px;
  display: block;
}

.login-box h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

.login-box input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

.login-box button {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.login-box .btn-primary {
  background-color: #345eeb;
  color: white;
}

.login-box .btn-primary:hover {
  background-color: #2a4fd4;
}

.login-box .btn-google {
  background-color: white;
  color: #333;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.login-box .btn-google:hover {
  background-color: #f5f5f5;
}

.divider {
  text-align: center;
  margin: 20px 0;
  color: #999;
}

/* Dashboard */
.dashboard-container {
  min-height: 100vh;
  background: #f5f5f5;
  padding: 0;
}

.dashboard-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: white;
  padding: 0 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
}

.dashboard-logo-container {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.dashboard-logo {
  height: 45px;
  width: auto;
  object-fit: contain;
}

.dashboard-header h1 {
  font-size: 24px;
  color: #333;
  flex: 1;
  text-align: center;
  margin: 0;
}

.logout-btn {
  padding: 10px 20px;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.logout-btn:hover {
  background-color: #c82333;
}

.dashboard-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 30px 30px;
}

@media (max-width: 768px) {
  .dashboard-header {
    padding: 0 15px;
    height: 60px;
  }
  
  .dashboard-logo {
    height: 35px;
  }
  
  .dashboard-header h1 {
    font-size: 18px;
  }
  
  .logout-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .dashboard-content {
    padding: 80px 15px 15px;
  }
}

.card {
  background: white;
  padding: 30px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card h3 {
  margin-bottom: 20px;
  color: #333;
  font-size: 18px;
}

/* 매장 연결 카드 - 다크모드 스타일 */
.store-connect-card {
  background: #1e1e1e;
  color: #e0e0e0;
}

.store-connect-card h3 {
  color: #ffffff;
}

.store-connect-card p {
  color: #e8e8e8;
}

.store-connect-card label {
  color: #f0f0f0;
}

.store-connect-card input {
  background: #2d2d2d;
  color: #ffffff;
  border: none;
  outline: none;
}

.store-connect-card input::placeholder {
  color: #888;
}

.store-connect-card input:focus {
  border: none;
  outline: none;
  background: #333;
}

.store-connect-card .btn-save {
  background-color: #ffffff;
  color: #000000;
}

.store-connect-card .btn-save:hover {
  background-color: #f0f0f0;
  color: #000000;
}

.inventory-card h3 {
  text-align: center;
}

.inventory-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.inventory-control button {
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  background-color: #4285f4;
  color: white;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inventory-control button:hover {
  background-color: #357ae8;
}

.inventory-control input {
  width: 120px;
  height: 60px;
  text-align: center;
  font-size: 48px;
  font-weight: bold;
  border: none;
  background: transparent;
  outline: none;
}

.inventory-update-time {
  text-align: center;
  color: #999;
  font-size: 14px;
  margin-bottom: 15px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.file-upload {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.file-upload:hover {
  border-color: #4285f4;
  background-color: #f8f9fa;
}

.file-upload input[type="file"] {
  display: none;
}

.file-preview {
  margin-top: 15px;
  max-width: 100%;
}

.file-preview img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
}

.btn-save {
  width: 100%;
  padding: 15px;
  background-color: #5c432c;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-save:hover {
  background-color: #4a3523;
}

/* Admin Page */
.admin-container {
  min-height: 100vh;
  background: #f5f5f5;
  padding: 30px;
}

.admin-header {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.admin-header h1 {
  font-size: 24px;
  color: #333;
}

.store-list {
  display: grid;
  gap: 20px;
}

.store-item {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.store-item-header {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.store-item-image {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

.store-item-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eee;
  color: #999;
  font-size: 13px;
}

.pending-title {
  margin-bottom: 16px;
  font-size: 18px;
  color: #333;
}

.pending-count {
  color: #0d6efd;
  font-weight: 700;
}

.store-item-info {
  flex: 1;
}

.store-item-info h3 {
  margin-bottom: 10px;
  color: #333;
}

.store-item-info p {
  margin-bottom: 5px;
  color: #666;
  font-size: 14px;
}

.store-item-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.btn-approve {
  padding: 10px 20px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.btn-approve:hover {
  background-color: #218838;
}

.btn-reject {
  padding: 10px 20px;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.btn-reject:hover {
  background-color: #c82333;
}

.btn-view {
  padding: 10px 20px;
  background-color: #17a2b8;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.btn-view:hover {
  background-color: #138496;
}

/* Loading Spinner */
.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #4285f4;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Alert Messages */
.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-size: 14px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}
