/* public/assets/style.css */
/* Minimal, professional design */

:root {
  --primary: #f63b3b;
  --primary-dark: #eb2525;
  --success: #10b981;
  --danger: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --border-radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray-900);
  background: var(--gray-50);
}

/* ==================== LOGIN PAGE ==================== */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  text-align: center;
}

.login-header .logo-icon {
  color: var(--primary);
  margin-bottom: 16px;
}

.login-header h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-header p {
  color: var(--gray-500);
  margin-bottom: 32px;
}

.google-login-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.google-login-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.error-message {
  margin-top: 16px;
  padding: 12px;
  background: #fee;
  color: var(--danger);
  border-radius: var(--border-radius);
  font-size: 13px;
}

.login-footer {
  margin-top: 24px;
  color: var(--gray-500);
  font-size: 12px;
}

/* ==================== APP HEADER ==================== */

.app-header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-left .logo-icon {
  color: var(--primary);
}

.header-left h1 {
  font-size: 20px;
  font-weight: 700;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-email {
  color: var(--gray-700);
  font-size: 14px;
}

.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--border-radius);
  color: var(--gray-700);
  transition: background 0.2s;
}

.dropdown-toggle:hover {
  background: var(--gray-100);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  min-width: 150px;
}

.dropdown-menu a {
  display: block;
  padding: 12px 16px;
  color: var(--gray-700);
  text-decoration: none;
  transition: background 0.2s;
}

.dropdown-menu a:hover {
  background: var(--gray-50);
}

/* ==================== MAIN CONTENT ==================== */

.app-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

.container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ==================== LOADING & EMPTY STATE ==================== */

.loading {
  text-align: center;
  padding: 40px;
  color: var(--gray-500);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.empty-state svg {
  color: var(--gray-300);
  margin-bottom: 16px;
}

.empty-state h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--gray-500);
  margin-bottom: 24px;
}

.empty-state-small {
  text-align: center;
  padding: 40px;
  color: var(--gray-500);
}

/* ==================== MAIN LINK CARD ==================== */

.main-link-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.card-icon {
  flex-shrink: 0;
  padding: 12px;
  background: var(--gray-100);
  border-radius: var(--border-radius);
  color: var(--primary);
}

.card-info {
  flex: 1;
}

.card-info h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.card-url {
  color: var(--gray-500);
  font-size: 13px;
  text-decoration: none;
}

.card-url:hover {
  color: var(--primary);
}

.card-actions {
  display: flex;
  gap: 8px;
}

.card-mode {
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.toggle-group {
  display: flex;
  gap: 0;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.toggle-btn {
  padding: 8px 16px;
  background: white;
  border: none;
  border-right: 1px solid var(--gray-300);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn:last-child {
  border-right: none;
}

.toggle-btn:hover {
  background: var(--gray-50);
}

.toggle-btn.active {
  background: var(--primary);
  color: white;
}

/* ==================== DESTINATIONS ==================== */

.destinations-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.destinations-header h2 {
  font-size: 18px;
}

.destinations-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.destination-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 20px;
  transition: opacity 0.2s;
}

.destination-card.inactive {
  opacity: 0.5;
}

.dest-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.dest-info {
  flex: 1;
  min-width: 0;
}

.dest-info h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.dest-url {
  color: var(--gray-500);
  font-size: 12px;
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dest-url:hover {
  color: var(--primary);
}

.dest-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dest-stats {
  display: flex;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

.stat {
  flex: 1;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.stat-value {
  display: block;
  font-size: 18px;
  font-weight: 600;
}

.dest-conversion {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
}

.dest-conversion small {
  color: var(--gray-500);
  font-size: 12px;
}

/* ==================== BUTTONS ==================== */

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--gray-200);
  color: var(--gray-700);
}

.btn-secondary:hover {
  background: var(--gray-300);
}

.icon-btn {
  padding: 8px;
  background: none;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  color: var(--gray-700);
  transition: background 0.2s;
}

.icon-btn:hover {
  background: var(--gray-100);
}

.icon-btn.delete-btn:hover {
  background: #fee;
  color: var(--danger);
}

/* ==================== SWITCH TOGGLE ==================== */

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--gray-300);
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--success);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* ==================== MODAL ==================== */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: var(--border-radius);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 18px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray-500);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
}

.modal-close:hover {
  background: var(--gray-100);
}

.modal-body {
  padding: 24px;
}

/* ==================== FORMS ==================== */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="url"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group small {
  display: block;
  margin-top: 4px;
  color: var(--gray-500);
  font-size: 12px;
}

.icon-selector {
  display: flex;
  gap: 8px;
}

.icon-option {
  padding: 12px;
  background: var(--gray-100);
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s;
}

.icon-option:hover {
  background: var(--gray-200);
}

.icon-option.active {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: white;
}

.icon-option svg {
  display: block;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
  .header-content {
    padding: 12px 16px;
  }
  
  .app-main {
    padding: 20px 16px;
  }
  
  .destinations-list {
    grid-template-columns: 1fr;
  }
  
  .user-email {
    display: none;
  }
}
