/* Modern CSS Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Light Theme Colors */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Dark Theme Colors */
  --dark-bg-primary: #0f172a;
  --dark-bg-secondary: #1e293b;
  --dark-text-primary: #f1f5f9;
  --dark-text-secondary: #94a3b8;
  --dark-border-color: #334155;
}

/* Dark Theme */
body.dark {
  --bg-primary: var(--dark-bg-primary);
  --bg-secondary: var(--dark-bg-secondary);
  --text-primary: var(--dark-text-primary);
  --text-secondary: var(--dark-text-secondary);
  --border-color: var(--dark-border-color);
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
  animation: backgroundShift 20s ease-in-out infinite;
  z-index: -1;
}

@keyframes backgroundShift {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* Floating Particles */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 15s infinite linear;
}

@keyframes float {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/* Authentication Styles */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 3rem;
  max-width: 450px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.auth-form {
  display: none;
  animation: fadeInUp 0.3s ease;
}

.auth-form.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-form h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  color: var(--text-primary);
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.form-group input::placeholder {
  color: var(--text-secondary);
}

.auth-btn {
  width: 100%;
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  background: var(--success-gradient);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.auth-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.auth-btn:hover::before {
  left: 100%;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.auth-btn:active {
  transform: translateY(0);
}

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
}

.auth-switch p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.auth-switch a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.auth-switch a:hover {
  color: #5a67d8;
  text-decoration: underline;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.8s ease-out;
  position: relative;
}

/* Header Updates for Authentication */
.header-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-greeting {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.user-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--primary-gradient);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow-md);
}

.user-menu-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.user-initials {
  font-weight: 600;
  font-size: 0.9rem;
}

/* User Menu Dropdown */
.user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1rem;
  min-width: 250px;
  box-shadow: var(--shadow-xl);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.user-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
}

.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
}

.user-details h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.user-details p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0.25rem 0 0 0;
}

.user-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.menu-action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.menu-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.menu-action-btn span {
  font-size: 1rem;
}

/* Responsive Authentication */
@media (max-width: 768px) {
  .auth-container {
    padding: 2rem;
    margin: 1rem;
  }
  
  .auth-header h1 {
    font-size: 2rem;
  }
  
  .header-left h1 {
    font-size: 1.5rem;
  }
  
  .user-greeting {
    font-size: 0.8rem;
  }
  
  .user-menu {
    min-width: 200px;
    right: -1rem;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { filter: drop-shadow(0 0 5px rgba(102, 126, 234, 0.5)); }
  to { filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.8)); }
}

/* Theme Toggle Button */
#theme-toggle {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 50px;
  background: var(--secondary-gradient);
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

#theme-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

#theme-toggle:hover::before {
  left: 100%;
}

#theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

/* Main Grid */
main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
section {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-gradient);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

section:hover::before {
  transform: scaleX(1);
}

section:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--success-gradient);
  border-radius: 2px;
}

/* Form Styles */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input, select {
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  color: var(--text-primary);
}

input:focus, select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

input::placeholder {
  color: var(--text-secondary);
}

/* Select dropdown options styling */
select option {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  padding: 0.5rem;
}

/* Dark mode specific select styling */
body.dark select option {
  background: var(--dark-bg-secondary) !important;
  color: var(--dark-text-primary) !important;
}

body.dark select option:hover {
  background: var(--dark-bg-primary) !important;
  color: var(--dark-text-primary) !important;
}

body.dark select option:checked {
  background: var(--dark-bg-primary) !important;
  color: var(--dark-text-primary) !important;
}

/* Optgroup styling */
select optgroup {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  font-weight: 600;
}

body.dark select optgroup {
  background: var(--dark-bg-secondary) !important;
  color: var(--dark-text-primary) !important;
}

/* Additional browser-specific dropdown styling */
select {
  padding-right: 1rem;
}

/* Additional browser-specific fixes for dropdown styling */
body.dark select {
  color-scheme: dark;
}

/* Force dark styling for all select elements in dark mode */
body.dark select,
body.dark select option,
body.dark select optgroup {
  background-color: var(--dark-bg-secondary) !important;
  color: var(--dark-text-primary) !important;
}

/* Specific styling for dropdown list */
body.dark select:focus option {
  background-color: var(--dark-bg-secondary) !important;
  color: var(--dark-text-primary) !important;
}

/* Ensure proper contrast for selected options */
body.dark select option:selected {
  background-color: var(--dark-bg-primary) !important;
  color: var(--dark-text-primary) !important;
}

/* Buttons */
button[type="submit"] {
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  background: var(--success-gradient);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

button[type="submit"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

button[type="submit"]:hover::before {
  left: 100%;
}

button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

button[type="submit"]:active {
  transform: translateY(0);
}

/* Summary Cards */
.summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.summary p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.summary p:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.summary span {
  font-weight: 600;
  font-size: 1.1rem;
}

#totalIncome {
  color: #10b981;
}

#totalExpense {
  color: #ef4444;
}

#balance {
  color: #3b82f6;
}

/* Transaction List */
ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  animation: slideInRight 0.5s ease-out;
  backdrop-filter: blur(5px);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

li:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.transaction-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.transaction-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.transaction-desc {
  font-weight: 500;
  color: var(--text-primary);
}

.transaction-type {
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  font-weight: 500;
  text-transform: capitalize;
}

.transaction-type.income {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.transaction-type.expense {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.transaction-amount {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.amount {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.delete-btn {
  padding: 0.5rem;
  border: none;
  border-radius: 8px;
  background: var(--danger-gradient);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  opacity: 0.7;
}

.delete-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
  opacity: 1;
}

/* Chart Container */
.charts {
  grid-column: 1 / -1;
  position: relative;
  height: 400px;
}

canvas {
  max-width: 100%;
  height: 100% !important;
  border-radius: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  main {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  section {
    padding: 1.5rem;
  }
  
  .charts {
    height: 300px;
  }
  
  /* Mobile form improvements */
  form {
    gap: 1.5rem;
  }
  
  input, select {
    padding: 1.2rem;
    font-size: 1.1rem;
  }
  
  button[type="submit"] {
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
  }
  
  /* Mobile transaction list */
  li {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .transaction-info {
    align-items: center;
  }
  
  .transaction-meta {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  /* Mobile filters */
  .filters {
    flex-direction: column;
    gap: 1rem;
  }
  
  .filter-group {
    min-width: auto;
  }
  
  /* Mobile export/import */
  .export-import-controls {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .export-buttons {
    flex-direction: column;
  }
  
  .file-input-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  
  /* Mobile currency settings */
  .currency-controls {
    gap: 1rem;
  }
  
  /* Mobile savings goal */
  .goal-input {
    flex-direction: column;
    gap: 1rem;
  }
  
  .goal-input input {
    width: 100%;
  }
  
  .goal-input button {
    width: 100%;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .container {
    padding: 0.5rem;
  }
  
  header {
    padding: 0.75rem;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  section {
    padding: 1rem;
  }
  
  form {
    gap: 1rem;
  }
  
  input, select {
    padding: 1rem;
    font-size: 1rem;
  }
  
  button[type="submit"] {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
  
  .charts {
    height: 250px;
  }
  
  /* Very small screens - stack everything */
  .transaction-amount {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .delete-btn {
    width: 100%;
    margin-top: 0.5rem;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #667eea;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Pulse Animation for Interactive Elements */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Savings Goal Styles */
.savings-goal {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.goal-input {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.goal-input input {
  flex: 1;
}

.goal-input button {
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  background: var(--warning-gradient);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.goal-input button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.progress-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-fill {
  height: 100%;
  background: var(--success-gradient);
  border-radius: 10px;
  transition: width 0.8s ease;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

#progressPercentage {
  font-weight: 600;
  color: var(--text-primary);
}

/* Filter Styles */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 150px;
}

.filter-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.filter-group select {
  padding: 0.75rem 1rem 0.75rem 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.filter-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Filter dropdown options styling */
.filter-group select option {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  padding: 0.5rem;
}

body.dark .filter-group select option {
  background: var(--dark-bg-secondary) !important;
  color: var(--dark-text-primary) !important;
}

body.dark .filter-group select option:hover {
  background: var(--dark-bg-primary) !important;
  color: var(--dark-text-primary) !important;
}

body.dark .filter-group select option:checked {
  background: var(--dark-bg-primary) !important;
  color: var(--dark-text-primary) !important;
}

/* Filter optgroup styling */
.filter-group select optgroup {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  font-weight: 600;
}

body.dark .filter-group select optgroup {
  background: var(--dark-bg-secondary) !important;
  color: var(--dark-text-primary) !important;
}

.clear-filters-btn {
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--danger-gradient);
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-end;
  margin-top: 1.5rem;
}

.clear-filters-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Transaction Category Styles */
.transaction-category {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-weight: 500;
  text-transform: capitalize;
  background: rgba(102, 126, 234, 0.2);
  color: #667eea;
}

/* Transaction Currency Styles */
.transaction-currency {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.original-amount {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-left: 0.5rem;
}

/* Responsive Filter Styles */
@media (max-width: 768px) {
  .filters {
    flex-direction: column;
  }
  
  .filter-group {
    min-width: auto;
  }
  
  .clear-filters-btn {
    align-self: stretch;
    margin-top: 0;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-gradient);
}

/* Export & Import Styles */
.export-import {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.export-import-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.export-section,
.import-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.export-section:hover,
.import-section:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.export-section h3,
.import-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.export-section p,
.import-section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

.export-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.export-btn {
  flex: 1;
  min-width: 150px;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  font-size: 0.9rem;
}

.csv-btn {
  background: var(--success-gradient);
  color: white;
}

.json-btn {
  background: var(--primary-gradient);
  color: white;
}

.export-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.export-btn:hover::before {
  left: 100%;
}

.export-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.import-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.file-input-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.import-btn {
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  background: var(--warning-gradient);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.import-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.import-btn:hover::before {
  left: 100%;
}

.import-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.file-name {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-style: italic;
  flex: 1;
  min-width: 150px;
}

.process-btn {
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  background: var(--secondary-gradient);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.process-btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  cursor: not-allowed;
  opacity: 0.5;
}

.process-btn:not(:disabled)::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.process-btn:not(:disabled):hover::before {
  left: 100%;
}

.process-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.import-info {
  margin-top: 0.5rem;
}

.import-info small {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-style: italic;
}

/* Drag and Drop Styles */
.import-section.drag-over {
  background: rgba(102, 126, 234, 0.1);
  border-color: #667eea;
  transform: scale(1.02);
}

.import-section.drag-over::before {
  content: 'Drop file here';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(102, 126, 234, 0.9);
  color: white;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  z-index: 10;
  pointer-events: none;
}

/* Currency Settings Styles */
.currency-settings {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.currency-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.currency-selector {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.currency-selector label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.currency-selector select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.currency-selector select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.exchange-rates {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.update-rates-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  background: var(--primary-gradient);
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.update-rates-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.update-rates-btn:hover::before {
  left: 100%;
}

.update-rates-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.update-rates-btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  cursor: not-allowed;
  opacity: 0.5;
}

.rates-status {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

.rates-status.updated {
  color: #10b981;
  font-weight: 500;
}

.rates-status.error {
  color: #ef4444;
  font-weight: 500;
}

/* Currency symbol styling */
.currency-symbol {
  font-weight: 600;
  color: var(--text-primary);
}

/* Loading animation for exchange rates */
.loading-rates {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #667eea;
  animation: spin 1s ease-in-out infinite;
  margin-right: 0.5rem;
}

/* Save Data Popup Styles */
.save-data-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.save-data-popup {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2.5rem;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.4s ease;
  text-align: center;
}

.save-data-header h3 {
  font-size: 1.75rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.save-data-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.save-data-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.save-data-btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.save-data-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.save-data-btn:hover::before {
  left: 100%;
}

.save-data-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.login-btn {
  background: var(--success-gradient);
  color: white;
}

.signup-btn {
  background: var(--primary-gradient);
  color: white;
}

.later-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.save-data-info {
  margin-top: 1rem;
}

.save-data-info small {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-style: italic;
}

/* Responsive Design for Save Data Popup */
@media (max-width: 768px) {
  .save-data-popup {
    padding: 2rem;
    margin: 1rem;
  }
  
  .save-data-header h3 {
    font-size: 1.5rem;
  }
  
  .save-data-actions {
    gap: 0.75rem;
  }
  
  .save-data-btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Responsive Design for Export/Import */
@media (max-width: 768px) {
  .export-import-controls {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .export-buttons {
    flex-direction: column;
  }
  
  .export-btn {
    min-width: auto;
  }
  
  .file-input-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  
  .file-name {
    text-align: center;
    min-width: auto;
  }
  
  .currency-controls {
    gap: 1rem;
  }
}



/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Footer Styles */
.footer {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 4rem;
  padding: 4rem 0 0 0;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.footer-section h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-section h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
  position: relative;
}

.footer-section h4::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 2rem;
  height: 2px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 1px;
}

.footer-section p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 300px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 0;
  font-weight: 400;
}

.footer-links a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 1px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  transition: width 0.3s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
  padding-left: 1rem;
  transform: translateX(0.25rem);
}

.footer-links a:hover::before {
  width: 0.75rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.social-link:hover::before {
  left: 100%;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.social-link span {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.social-link:hover span {
  transform: scale(1.1);
}

.footer-bottom {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.footer-bottom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.footer-bottom-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.footer-bottom-links {
  display: flex;
  gap: 2rem;
}

.footer-bottom-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
  color: var(--text-primary);
}

/* Global footer link styling - remove all underlines */
.footer a {
  text-decoration: none !important;
}

.footer a:hover {
  text-decoration: none !important;
}

.footer a:visited {
  text-decoration: none !important;
}

.footer a:link {
  text-decoration: none !important;
}

/* Remove default link underlines and styling */
.footer-links a {
  text-decoration: none !important;
  color: var(--text-secondary) !important;
  border: none !important;
  outline: none !important;
}

.footer-links a:visited {
  text-decoration: none !important;
  color: var(--text-secondary) !important;
}

.footer-links a:link {
  text-decoration: none !important;
  color: var(--text-secondary) !important;
}

.footer-links a:active {
  text-decoration: none !important;
  color: var(--text-secondary) !important;
}

/* Responsive Footer */
@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .footer {
    margin-top: 2rem;
    padding: 3rem 0 0 0;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 0 1.5rem;
  }
  
  .footer-section {
    text-align: center;
  }
  
  .footer-section p {
    max-width: none;
  }
  
  .social-links {
    justify-content: center;
    gap: 1rem;
  }
  
  .social-link {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .footer-bottom-links {
    justify-content: center;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .footer-content {
    padding: 0 1rem;
  }
  
  .social-links {
    flex-direction: column;
    align-items: center;
  }
  
  .social-link {
    width: 100%;
    max-width: 200px;
    justify-content: center;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  /* Touch devices */
  .social-link:hover,
  .footer-links a:hover,
  .footer-bottom-links a:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.1);
  }
  
  button, .social-link, .footer-links a {
    min-height: 44px; /* Apple's recommended touch target size */
    min-width: 44px;
  }
  
  .delete-btn {
    min-height: 44px;
    padding: 0.75rem 1rem;
  }
}

/* Prevent zoom on input focus on iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Better mobile navigation */
@media (max-width: 768px) {
  .user-menu {
    right: -1rem;
    min-width: 200px;
  }
  
  .user-menu-btn {
    width: 44px;
    height: 44px;
  }
  
  /* Make sure all interactive elements are touch-friendly */
  button, input, select, .social-link, .footer-links a {
    min-height: 44px;
    touch-action: manipulation;
  }
}

/* Footer link scroll offset */
section[id] {
  scroll-margin-top: 2rem;
}

/* Save Data Popup Styles */
.save-data-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.save-data-popup {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideUp 0.4s ease;
  position: relative;
  overflow: hidden;
}

.save-data-popup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.save-data-header {
  text-align: center;
  margin-bottom: 2rem;
}

.save-data-header h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.save-data-header p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1rem;
}

.save-data-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.save-data-btn {
  flex: 1;
  min-width: 120px;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.save-data-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.save-data-btn:hover::before {
  left: 100%;
}

.login-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.signup-btn {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
}

.signup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(79, 172, 254, 0.3);
}

.later-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.later-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.save-data-info {
  text-align: center;
}

.save-data-info small {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive popup */
@media (max-width: 480px) {
  .save-data-popup {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }
  
  .save-data-actions {
    flex-direction: column;
  }
  
  .save-data-btn {
    min-width: auto;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  /* Touch devices */
  .social-link:hover,
  .footer-links a:hover,
  .footer-bottom-links a:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.1);
  }
  
  button, .social-link, .footer-links a {
    min-height: 44px; /* Apple's recommended touch target size */
    min-width: 44px;
  }
  
  .delete-btn {
    min-height: 44px;
    padding: 0.75rem 1rem;
  }
}

/* Prevent zoom on input focus on iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Better mobile navigation */
@media (max-width: 768px) {
  .user-menu {
    right: -1rem;
    min-width: 200px;
  }
  
  .user-menu-btn {
    width: 44px;
    height: 44px;
  }
  
  /* Make sure all interactive elements are touch-friendly */
  button, input, select, .social-link, .footer-links a {
    min-height: 44px;
    touch-action: manipulation;
  }
}