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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

header {
  text-align: center;
  color: white;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.2);
  padding: 10px;
  border-radius: 12px;
}

.tab-btn {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.tab-btn.active {
  background: white;
  color: #667eea;
  border-color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h2 {
  color: #667eea;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

h3 {
  margin-top: 20px;
  margin-bottom: 15px;
  color: #555;
}

.account-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.account-info {
  flex: 1;
}

.account-name {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.account-details {
  color: #666;
  font-size: 0.9rem;
}

.account-actions button {
  background: #ff4444;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
}

.account-actions button:hover {
  background: #cc0000;
}

.add-account form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.add-account input {
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1rem;
}

.add-account input:focus {
  outline: none;
  border-color: #667eea;
}

.add-account button {
  grid-column: 1 / -1;
  padding: 12px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
}

.add-account button:hover {
  background: #5568d3;
}

.strategy-inputs {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.input-group {
  display: flex;
  flex-direction: column;
}

.input-group label {
  font-weight: bold;
  margin-bottom: 5px;
  color: #555;
}

.input-group input {
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1rem;
}

.input-group input:focus {
  outline: none;
  border-color: #667eea;
}

#calculate-btn {
  padding: 15px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
}

#calculate-btn:hover {
  background: #059669;
}

.summary-box {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.stat {
  background: rgba(255, 255, 255, 0.2);
  padding: 15px;
  border-radius: 6px;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
}

.suggestion-box {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.suggestion-box h3 {
  color: #92400e;
  margin-top: 0;
}

.timeline {
  margin-top: 20px;
}

.timeline-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.timeline-controls button {
  padding: 8px 15px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.timeline-controls button:hover {
  background: #5568d3;
}

.month-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  border-left: 4px solid #667eea;
}

.month-header {
  font-weight: bold;
  margin-bottom: 10px;
  color: #667eea;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
}

.payment-row:last-child {
  border-bottom: none;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: #999;
}

.calculator-inputs {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#calc-btn {
  padding: 15px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
}

#calc-btn:hover {
  background: #5568d3;
}

.result-box {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px;
  border-radius: 8px;
  margin-top: 20px;
}

.result-box h3 {
  margin-top: 0;
  color: white;
}

.apr-display {
  text-align: center;
  margin: 20px 0;
}

.apr-value {
  font-size: 3.5rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.apr-label {
  font-size: 1rem;
  opacity: 0.9;
}

.calc-breakdown {
  background: rgba(255, 255, 255, 0.15);
  padding: 15px;
  border-radius: 6px;
  margin-top: 20px;
}

.calc-breakdown p {
  margin: 8px 0;
}

.calc-breakdown strong {
  font-weight: 600;
}

.secondary-btn {
  width: 100%;
  padding: 12px;
  background: white;
  color: #667eea;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  margin-top: 15px;
}

.secondary-btn:hover {
  background: #f0f0f0;
}

.lump-sum-box {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.lump-sum-box h3 {
  margin-top: 0;
  color: white;
  font-size: 1.5rem;
}

.lump-sum-box h4 {
  margin-top: 15px;
  margin-bottom: 10px;
  color: white;
  font-size: 1.1rem;
}

.impact-section {
  background: rgba(255, 255, 255, 0.15);
  padding: 15px;
  border-radius: 6px;
  margin-top: 15px;
}

.impact-card {
  background: rgba(255, 255, 255, 0.2);
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.impact-card:last-child {
  margin-bottom: 0;
}

.freed-payment-total {
  background: rgba(16, 185, 129, 0.3);
  padding: 15px;
  border-radius: 6px;
  margin-top: 15px;
  border: 2px solid rgba(16, 185, 129, 0.5);
}

@media (max-width: 768px) {
  .add-account form {
    grid-template-columns: 1fr;
  }
  
  header h1 {
    font-size: 2rem;
  }
}
