/* =============================================
   CSS Variables & Base
   ============================================= */
:root {
    --primary: #6C63FF;
    --primary-dark: #5a52d5;
    --primary-light: #ece9ff;
    --accent: #FF6584;
    --accent2: #43CBFF;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text: #1e1b4b;
    --text-muted: #64748b;
    --text-faint: #94a3b8;
    --bg: #f0f4ff;
    --card: rgba(255, 255, 255, 0.85);
    --card-border: rgba(108, 99, 255, 0.12);
    --shadow: 0 8px 32px rgba(108, 99, 255, 0.12);
    --radius: 20px;
    --radius-sm: 12px;
    --font: 'Noto Sans JP', 'Inter', sans-serif;
    --transition: 0.2s cubic-bezier(.4, 0, .2, 1);
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Background Shapes */
.bg-shapes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    animation: float 14s ease-in-out infinite;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #a78bfa, #6C63FF);
    top: -150px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #43CBFF, #7B2FFF);
    bottom: -100px;
    left: -80px;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #FF6584, #FFBE76);
    top: 40%;
    left: 50%;
    animation-delay: -9s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-30px) scale(1.06);
    }
}

/* Layout */
.container {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
    padding: 32px 16px 48px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 12px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.header p {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--card);
    border: 1.5px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 32px 28px;
    margin-bottom: 24px;
    transition: box-shadow var(--transition);
}

.card:hover {
    box-shadow: 0 12px 48px rgba(108, 99, 255, 0.18);
}

.step-label {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 100px;
    margin-bottom: 8px;
}

.card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.section-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    margin-top: -12px;
}

/* Form Elements */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.hint-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

textarea,
input[type="text"] {
    width: 100%;
    border: 1.5px solid var(--card-border);
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text);
    transition: border var(--transition), box-shadow var(--transition);
    outline: none;
}

textarea:focus,
input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.12);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* Divider */
.divider {
    text-align: center;
    position: relative;
    margin: 20px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--card-border);
}

.divider span {
    position: relative;
    background: var(--card);
    padding: 0 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Upload Area */
.upload-area {
    display: block;
    border: 2px dashed #c4b5fd;
    background: rgba(108, 99, 255, 0.04);
    border-radius: var(--radius-sm);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-area input[type="file"] {
    display: none;
}

.upload-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.upload-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    display: block;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    border: none;
    border-radius: 100px;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition);
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.35);
    margin-top: 12px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(108, 99, 255, 0.45);
}

.btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 10px 20px;
    background: var(--primary-light);
    color: var(--primary);
    border: 1.5px solid #c4b5fd;
    border-radius: 100px;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-danger {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-faint);
    font-size: 1.1rem;
    line-height: 1;
    padding: 4px;
    transition: color var(--transition);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-danger:hover {
    color: var(--danger);
    background: #fef2f2;
}

/* Event Cards */
.event-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1.5px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 12px;
    display: grid;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.event-num {
    font-size: 0.72rem;
    font-weight: 700;
    color: white;
    background: var(--primary);
    border-radius: 100px;
    padding: 2px 8px;
    flex-shrink: 0;
}

.event-fields {
    display: grid;
    gap: 8px;
}

.event-field {
    display: grid;
    grid-template-columns: 64px 1fr;
    align-items: center;
    gap: 8px;
}

.event-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: right;
}

.event-field input[type="text"],
.event-field input[type="date"],
.event-field input[type="time"] {
    font-size: 0.88rem;
    padding: 7px 10px;
    margin: 0;
}

.time-fields {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 6px;
}

.time-sep {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* Result Actions */
.result-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.result-actions .btn-primary {
    flex: 1;
    margin-top: 0;
    min-width: 180px;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-faint);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 480px) {
    .card {
        padding: 24px 18px;
    }

    .header h1 {
        font-size: 1.6rem;
    }

    .event-field {
        grid-template-columns: 52px 1fr;
    }
}
/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 24px;
  padding: 6px 14px;
  background: var(--primary-light);
  border-radius: 100px;
  transition: all var(--transition);
}
.back-link:hover {
  background: var(--primary);
  color: white;
}

footer a {
  color: var(--primary);
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}
