:root {
  /* Color Palette */
  --primary: #00d4ff;
  --primary-dark: #0099cc;
  --accent: #ffcc00;
  --bg-dark: #0f172a;
  --bg-light: #1e293b;
  --text-main: #f8fafc;
  --text-dim: #94a3b8;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Cairo", "Outfit", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow: hidden; /* Prevent scrolling on body, app container will handle */
  height: 100vh;
  width: 100vw;
}

.app-container {
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

/* Background Effects */
.bg-blur {
  position: fixed;
  top: -50px;
  right: -50px;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(0, 212, 255, 0.15) 0%,
    transparent 70%
  );
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}

.bg-gradient {
  position: fixed;
  bottom: -50px;
  left: -50px;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(15, 23, 42, 0.8) 0%,
    transparent 70%
  );
  filter: blur(20px);
  pointer-events: none;
  z-index: -1;
}

/* Header */
.main-header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 6px 10px;
}

.header-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}


.subText {
  font-family: "Outfit", sans-serif;
  font-size: 0.6rem;
  letter-spacing: 4px;
  color: var(--text-dim);
  margin-top: 2px;
}


.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}


.header-site-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 212, 255, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
}

.header-site-box span {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-site-box svg {
    width: 14px;
    height: 14px;
    color: var(--primary);
}

.nav-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
}


/* Page Transitions */
.content-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1rem;
  position: relative;
}

.page {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Main Menu */
.grid-menu {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.menu-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.2rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--glass-shadow);
  width: 100%;
}

.menu-card:active {
  transform: scale(0.98) translateX(-5px);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

.menu-card.coming-soon {
  opacity: 0.6;
}

.icon-wrapper {
  width: 50px;
  height: 50px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.icon-wrapper svg {
  width: 32px;
  height: 32px;
}

.menu-card.coming-soon .icon-wrapper {
  margin-bottom: 0;
  width: 48px;
  height: 48px;
}

.card-label {
  font-size: 1.2rem;
  font-weight: 700;
  flex: 1;
}

.label-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

.badge {
  background: var(--accent);
  color: #000;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  margin-right: 8px;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.page-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}

.back-btn {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.back-btn svg {
  width: 24px;
  height: 24px;
}

/* List Buttons */
.list-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.list-item {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 1.2rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-main);
  text-align: right;
  cursor: pointer;
  transition: var(--transition);
}

.list-item:active {
  transform: translateX(-5px);
  background: rgba(255, 255, 255, 0.1);
}

.item-icon {
  width: 40px;
  height: 40px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.2rem;
}

.item-icon svg {
  width: 20px;
  height: 20px;
}

/* Footer */
.main-footer {
  padding: 1rem;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--glass-border);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  justify-content: center;
}

.version-tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    opacity: 0.7;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 10px;
}

/* Site Status in Footer */
.site-status {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(0, 212, 255, 0.1);
    padding: 0.6rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.8rem;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition);
}

.site-status:active {
    background: rgba(0, 212, 255, 0.2);
}

.site-status svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.site-status span {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 600;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-light);
    width: 100%;
    max-width: 400px;
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}


.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.2rem;
    color: var(--primary);
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--primary);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn svg {
    width: 16px;
    height: 16px;
}

.icon-btn:active {
    transform: scale(0.88);
    background: rgba(0, 212, 255, 0.15);
}

.icon-btn.close-btn {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.2);
}

.icon-btn.close-btn:active {
    background: rgba(255, 107, 107, 0.15);
}


.modal-search-box {
    margin-bottom: 1.5rem;
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.modal-search-box.active {
    display: block;
}

.modal-search-box input {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--primary);
    padding: 1rem;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.1);
}

/* Add Form Styles */
.form-group-light {
    margin-bottom: 1.2rem;
}

.form-group-light label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}

.form-group-light input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    outline: none;
}

.form-group-light input:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,0.08);
}


/* Multi-step Modal Styles */
.modal-step {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.modal-step.active {
    display: block;
}

.modal-sub-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.modal-sub-header h4 {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 600;
}

.small-back-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--primary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.small-back-btn svg {
    width: 18px;
    height: 18px;
}

/* Custom List Selector */
.custom-list-selector {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.2rem;
}

.list-select-item {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    text-align: right;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.list-select-item:active {
    background: rgba(0, 212, 255, 0.1);
    transform: scale(0.98);
}

.list-select-item.selected {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

/* Summary Card */
.site-summary-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-item label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.summary-item span {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 700;
}

.submit-btn {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 1.2rem;
    border-radius: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.submit-btn.highlight {
    background: linear-gradient(135deg, var(--primary) 0%, #0087a3 100%);
    color: #000;
    border: none;
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3), 
                inset 0 2px 5px rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.submit-btn.highlight::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: 0.5s;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.submit-btn.highlight:active {
    transform: scale(0.96) translateY(2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

.submit-btn.highlight svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.submit-btn.highlight:hover svg {
    transform: translateX(-5px);
}



/* Toast Notification */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--primary);
    color: #000;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 3000;
    white-space: nowrap;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* Action Page Styles */
.action-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.site-info-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.info-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 0.8rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.info-tag svg {
    width: 14px;
    height: 14px;
    color: var(--primary);
}

.info-tag span {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-weight: 600;
}

.capture-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.capture-section label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.media-grid {
    display: flex;
    gap: 1rem;
}

.media-add-btn {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--glass-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-dim);
    cursor: pointer;
}

.media-add-btn svg {
    width: 24px;
    height: 24px;
}

.media-add-btn span {
    font-size: 0.7rem;
}

#actionNotes {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.8rem;
    color: #fff;
    resize: none;
    height: 80px;
    font-family: inherit;
    font-size: 0.9rem;
}

.action-form-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-right: 0.5rem;
}

.form-field input, .form-field select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 15px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
}

.form-field input:focus {
    border-color: var(--primary);
    background: rgba(0, 212, 255, 0.05);
}

/* Update Banner */
.update-banner {
    position: fixed;
    top: -60px;
    left: 0;
    right: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #00d4ff, #0087a3);
    color: #000;
    font-weight: 700;
    font-size: 0.9rem;
    transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.update-banner.show {
    top: 0;
}

.update-banner button {
    background: rgba(0,0,0,0.2);
    color: #fff;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.8rem;
}
