/* style.css - Colorful and user-friendly airline booking design */

/* Vibrant color palette */
:root{
  --primary: #3b82f6;
  --secondary: #8b5cf6;
  --accent: #ec4899;
  --success: #10b981;
  --warning: #f59e0b;
  --bg-start: #1e1b4b;
  --bg-end: #312e81;
  --card-bg: #ffffff;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --text-white: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 40px rgba(0,0,0,0.15);
  --maxw: 1200px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*{box-sizing:border-box;margin:0;padding:0}

html,body{
  height:100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Animated background pattern */
.bg-hero{
  position:fixed;
  inset:0;
  z-index:0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,0.12) 0%, transparent 50%);
  pointer-events:none;
}

.bg-hero::after{
  content:"";
  position:absolute;
  inset:0;
  opacity:0.06;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><g fill="none" stroke="%23ffffff" stroke-width="2"><circle cx="50" cy="50" r="30"/><path d="M20 50 L80 50 M50 20 L50 80"/></g></svg>');
  background-repeat:repeat;
  animation: patternFloat 20s linear infinite;
}

@keyframes patternFloat {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Layout */
.container{
  position:relative;
  z-index:2;
  max-width:var(--maxw);
  margin:40px auto;
  padding:20px;
  display:flex;
  flex-direction:column;
  gap:24px;
}

/* Header with gradient */
.header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:24px 32px;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
  backdrop-filter: blur(20px);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  border:2px solid rgba(255,255,255,0.3);
}

.header h1{
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size:32px;
  font-weight:800;
  letter-spacing:-0.5px;
}

.header .muted{
  color:var(--text-light);
  font-size:14px;
}

.controls{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.controls label{
  font-size:12px;
  font-weight:600;
  color:var(--text-light);
  text-transform:uppercase;
  letter-spacing:0.5px;
}

/* Cards with vibrant design */
.card{
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.9));
  backdrop-filter: blur(20px);
  border-radius:var(--radius);
  padding:32px;
  box-shadow:var(--shadow);
  border:2px solid rgba(255,255,255,0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover{
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.search-card h2, .results-card h2{
  margin:0 0 24px 0;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size:28px;
  font-weight:700;
}

/* Form styling */
.grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:16px;
}

input, select{
  padding:14px 18px;
  border-radius:12px;
  border:2px solid #e5e7eb;
  background:white;
  color:var(--text-dark);
  font-size:15px;
  font-weight:500;
  transition: all 0.3s ease;
}

input:focus, select:focus{
  outline:none;
  border-color:var(--primary);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.1);
  transform: translateY(-2px);
}

input::placeholder{
  color:var(--text-light);
}

.actions{
  grid-column:1/-1;
  display:flex;
  gap:12px;
  margin-top:8px;
}

/* Colorful buttons */
.btn-primary{
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color:white;
  padding:14px 28px;
  border-radius:12px;
  border:none;
  cursor:pointer;
  font-size:16px;
  font-weight:700;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59,130,246,0.4);
}

.btn-primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59,130,246,0.5);
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.btn-primary:active{
  transform: translateY(0);
}

.btn-primary:disabled{
  background: linear-gradient(135deg, #9ca3af, #6b7280);
  cursor:not-allowed;
  box-shadow:none;
}

.btn-large{
  width:100%;
  padding:16px;
  font-size:18px;
}

.btn-ghost{
  background:white;
  color:var(--text-dark);
  padding:14px 24px;
  border-radius:12px;
  border:2px solid #e5e7eb;
  cursor:pointer;
  font-weight:600;
  transition: all 0.3s ease;
}

.btn-ghost:hover{
  background:#f9fafb;
  border-color:var(--primary);
  transform: translateY(-2px);
}

/* Results with colorful cards */
.results-list{
  display:flex;
  flex-direction:column;
  gap:16px;
  margin-top:16px;
}

.result{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:24px;
  border-radius:12px;
  background: linear-gradient(135deg, #ffffff, #f9fafb);
  border:2px solid #e5e7eb;
  transition: all 0.3s ease;
}

.result:hover{
  border-color:var(--primary);
  box-shadow: 0 8px 30px rgba(59,130,246,0.15);
  transform: translateX(8px);
}

.result-left{
  display:flex;
  gap:16px;
  align-items:center;
}

.logo{
  width:64px;
  height:64px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color:white;
  font-weight:800;
  font-size:18px;
  box-shadow: 0 4px 15px rgba(240,147,251,0.4);
}

.flight-meta{
  color:var(--text-dark);
}

.flight-meta .airline{
  font-weight:700;
  font-size:18px;
  margin-bottom:4px;
}

.flight-meta .route{
  font-size:14px;
  color:var(--text-light);
}

.result-right{
  text-align:right;
}

.price{
  font-weight:800;
  font-size:24px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom:8px;
}

.muted{
  color:var(--text-light);
  font-size:14px;
}

.small{
  font-size:13px;
}

.book-btn{
  margin-top:12px;
  background: linear-gradient(135deg, #10b981, #059669);
  color:white;
  padding:10px 20px;
  border-radius:10px;
  border:none;
  cursor:pointer;
  font-weight:700;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(16,185,129,0.3);
}

.book-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16,185,129,0.4);
}

/* Modal with vibrant design */
.modal{
  display:none;
  position:fixed;
  inset:0;
  background: linear-gradient(135deg, rgba(102,126,234,0.95), rgba(118,75,162,0.95));
  z-index:1000;
  align-items:center;
  justify-content:center;
  padding:20px;
  backdrop-filter:blur(10px);
}

.modal-content{
  background:white;
  border-radius:24px;
  max-width:650px;
  width:100%;
  max-height:90vh;
  overflow-y:auto;
  box-shadow: 0 25px 80px rgba(0,0,0,0.3);
  border:3px solid rgba(255,255,255,0.5);
}

.modal-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:28px 32px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius:24px 24px 0 0;
}

.modal-header h2{
  margin:0;
  color:white;
  font-size:26px;
  font-weight:800;
}

.modal-close{
  background:rgba(255,255,255,0.2);
  border:none;
  color:white;
  font-size:28px;
  cursor:pointer;
  padding:0;
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  transition:all 0.3s ease;
  font-weight:300;
}

.modal-close:hover{
  background:rgba(255,255,255,0.3);
  transform:rotate(90deg);
}

.modal-body{
  padding:32px;
  color:var(--text-dark);
}

.modal-body h3{
  margin:0 0 16px 0;
  font-size:18px;
  color:var(--text-dark);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.5px;
}

.booking-summary, .passenger-info, .payment-methods{
  margin-bottom:28px;
  padding:20px;
  background:#f9fafb;
  border-radius:12px;
  border:2px solid #e5e7eb;
}

.detail-row{
  display:flex;
  justify-content:space-between;
  padding:12px 0;
  border-bottom:1px solid #e5e7eb;
}

.detail-row:last-child{
  border-bottom:none;
}

.detail-row span:first-child{
  color:var(--text-light);
  font-weight:600;
}

.detail-row span:last-child{
  color:var(--text-dark);
  font-weight:700;
}

#passenger-form{
  display:flex;
  flex-direction:column;
  gap:14px;
}

#passenger-form input{
  padding:14px 18px;
  border-radius:10px;
  border:2px solid #e5e7eb;
  background:white;
  color:var(--text-dark);
  font-size:15px;
}

#passenger-form input:focus{
  border-color:var(--primary);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.1);
}

/* Colorful payment tabs */
.payment-tabs{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
  margin-bottom:24px;
}

.payment-tab{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:14px 12px;
  background:white;
  border:3px solid #e5e7eb;
  border-radius:12px;
  color:var(--text-light);
  cursor:pointer;
  transition:all 0.3s ease;
  font-size:13px;
  font-weight:700;
  min-height:80px;
}

.payment-tab svg{
  width:28px;
  height:28px;
}

.payment-tab:hover{
  background:#f9fafb;
  transform:translateY(-2px);
}

.payment-tab.active{
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-color:transparent;
  color:white;
  box-shadow: 0 4px 15px rgba(59,130,246,0.4);
}

.payment-form{
  display:none;
  min-height:120px;
}

.payment-form.active{
  display:block;
}

#card-element{
  padding:16px;
  border-radius:10px;
  border:2px solid #e5e7eb;
  background:white;
}

.payment-error{
  color:#ef4444;
  font-size:14px;
  margin-top:10px;
  font-weight:600;
}

.payment-total{
  margin:28px 0;
  padding:24px;
  background: linear-gradient(135deg, #f9fafb, #ffffff);
  border-radius:12px;
  border:2px solid #e5e7eb;
}

.total-row{
  display:flex;
  justify-content:space-between;
  padding:10px 0;
  color:var(--text-dark);
  font-weight:600;
}

.total-final{
  border-top:3px solid #e5e7eb;
  margin-top:12px;
  padding-top:16px;
  font-size:22px;
  font-weight:800;
}

.total-final span:last-child{
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Japan payment methods */
.konbini-info{
  background:#fff3cd;
  border:2px solid #ffc107;
  border-radius:10px;
  padding:16px;
  margin-top:12px;
}

.konbini-info p{
  margin:8px 0;
  font-size:14px;
  color:#856404;
}

.konbini-stores{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin-top:12px;
}

.konbini-store{
  padding:8px;
  background:white;
  border:2px solid #e5e7eb;
  border-radius:8px;
  text-align:center;
  font-size:12px;
  font-weight:600;
  color:var(--text-dark);
}

/* Success modal with celebration */
.success-content{
  text-align:center;
  padding:48px 32px;
}

.success-icon{
  width:100px;
  height:100px;
  margin:0 auto 24px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 10px 40px rgba(16,185,129,0.4);
  animation: successPulse 2s ease infinite;
}

@keyframes successPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.success-icon svg{
  color:white;
}

.success-content h2{
  background: linear-gradient(135deg, #10b981, #059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin:0 0 12px 0;
  font-size:32px;
  font-weight:800;
}

.success-content p{
  color:var(--text-light);
  margin:0 0 28px 0;
  font-size:16px;
}

.confirmation-box{
  background:#f9fafb;
  border-radius:12px;
  padding:24px;
  margin:24px 0;
  text-align:left;
  border:2px solid #e5e7eb;
}

.confirmation-box p{
  margin:10px 0;
  color:var(--text-dark);
  font-size:15px;
}

.confirmation-box strong{
  color:var(--text-light);
  font-weight:700;
}

/* Footer with gradient */
.footer{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  padding:24px 32px;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
  backdrop-filter: blur(20px);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  border:2px solid rgba(255,255,255,0.3);
}

.footer #background-title{
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight:700;
}

.footer-right{
  color:var(--text-light);
  font-weight:600;
}

/* Responsive design */
@media (max-width:800px){
  .grid{grid-template-columns:1fr}
  .header{flex-direction:column;align-items:flex-start;gap:16px;padding:20px}
  .header h1{font-size:24px}
  .result{flex-direction:column;align-items:flex-start;gap:16px}
  .result-right{text-align:left;width:100%}
  .payment-tabs{grid-template-columns:1fr}
  .modal-content{max-height:95vh;border-radius:16px}
  .modal-header{border-radius:16px 16px 0 0}
  .container{padding:16px;margin:20px auto}
  .konbini-stores{grid-template-columns:repeat(2,1fr)}
}

/* Smooth scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5568d3, #6a3f8f);
}