:root {
  --primary: #7000ff;
  --secondary: #00d1ff;
  --bg-dark: #0a0a0f;
  --card-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #ffffff;
  --text-dim: #a0a0a0;
  --font-family: "Outfit", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 40px;
}

/* Animated Background Blobs */
.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: move 20s infinite alternate ease-in-out;
}

.blob-1 {
  background: var(--primary);
  top: -10%;
  left: -10%;
}

.blob-2 {
  background: var(--secondary);
  bottom: -10%;
  right: -10%;
  animation-delay: -5s;
}

.blob-3 {
  background: #ff00e5;
  top: 40%;
  left: 40%;
  width: 300px;
  height: 300px;
  animation-delay: -10s;
}

@keyframes move {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(100px, 50px) scale(1.1);
  }
}

/* Glass Container */
.container {
  width: 90%;
  max-width: 500px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  padding: 40px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  margin-bottom: 40px;
}

header {
  text-align: center;
  margin-bottom: 40px;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 20px;
  background: linear-gradient(to right, #fff, #aaa);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.total-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--glass-border);
}

.total-label {
  font-size: 0.9rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.total-value {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--secondary);
  text-shadow: 0 0 20px rgba(0, 209, 255, 0.3);
}

/* Form Styles */
.add-withdrawal h2,
.history h2 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--text-dim);
}

form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-left: 4px;
}

input,
select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 18px;
  color: white;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: all 0.3s ease;
}

input:focus,
select:focus {
  border-color: var(--secondary);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 10px rgba(0, 209, 255, 0.1);
}

select option {
  background-color: #1a1a1f;
  color: white;
}

.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.btn-add, .btn-sub {
  flex: 1;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-add {
  background: var(--primary);
}

.btn-sub {
  background: #ff4d4d;
}

.btn-add:hover, .btn-sub:hover {
  transform: translateY(-2px);
}

.btn-add:hover {
  box-shadow: 0 10px 20px rgba(112, 0, 255, 0.4);
}

.btn-sub:hover {
  box-shadow: 0 10px 20px rgba(255, 77, 77, 0.4);
}

.btn-add:active, .btn-sub:active {
  transform: scale(0.98);
}

/* History List */
.history {
  margin-top: 40px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transaction {
  background: rgba(255, 255, 255, 0.05);
  padding: 16px;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fadeIn 0.5s ease backwards;
}

.transaction-info {
  display: flex;
  flex-direction: column;
}

.transaction-name {
  font-weight: 600;
  font-size: 1rem;
}

.transaction-date {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.transaction-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-delete {
  background: rgba(255, 60, 60, 0.1);
  color: #ff4d4d;
  border: 1px solid rgba(255, 77, 77, 0.2);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-delete:hover {
  background: #ff4d4d;
  color: white;
  transform: scale(1.1);
}

.transaction-amount {
  font-weight: 800;
  color: var(--secondary);
  font-size: 1.1rem;
}

.amount-red {
  color: #ff4d4d;
}

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 20px;
  font-style: italic;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal Logs */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--container-bg);
  backdrop-filter: blur(20px);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

.log-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.85rem;
}

.status-success { color: #4CAF50; }
.status-failed { color: #f44336; }

@media (max-width: 600px) {
  .modal-content {
    width: 95%;
    padding: 20px;
  }
}
/* Mobile adjustments */
@media (max-width: 600px) {
  body {
    padding-top: 0;
    background-attachment: fixed;
  }
  
  .container {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    border-radius: 0;
    margin-bottom: 0;
    padding: 30px 20px;
    border: none;
    background: rgba(10, 10, 15, 0.8);
  }

  h1 {
    font-size: 2rem;
    margin-bottom: 15px;
  }

  .total-card {
    padding: 20px;
  }

  .total-value {
    font-size: 2.8rem;
  }

  input, select, .btn-add, .btn-sub {
    padding: 18px; /* Bigger touch surface */
    font-size: 1.1rem;
  }

  .transaction {
    padding: 14px;
  }
}
