/* ===========================
   BeeDay 60 Invitation Site
   Main Stylesheet
   =========================== */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1e40af;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --background: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 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);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)), url('../images/hossegor-poster.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
}

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

/* ==================
   Landing Page
   ================== */

.header-animation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease-out;
}

.celebration-icon {
    font-size: 48px;
    animation: bounce 1s infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-animation h1 {
    font-size: 42px;
    color: white;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.event-details {
    background: var(--card-background);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-details h2 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.tagline {
    font-size: 18px;
    color: var(--text-secondary);
}

.login-card {
    background: var(--card-background);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.login-card h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--text-primary);
    text-align: center;
}

/* ==================
   Forms
   ================== */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
}

/* ==================
   Buttons
   ================== */

.btn-primary,
.btn-secondary {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    width: 100%;
    margin-top: 10px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
}

/* ==================
   Info/Notes
   ================== */

.info-note {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.info-note p {
    color: var(--text-secondary);
    font-size: 14px;
}

.info-note a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.info-note a:hover {
    text-decoration: underline;
}

/* ==================
   RSVP Page
   ================== */

.header-small {
    background: var(--card-background);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.header-small h1 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.welcome-text {
    font-size: 18px;
    color: var(--text-secondary);
}

.welcome-text span {
    color: var(--primary-color);
    font-weight: 600;
}

.form-section {
    background: var(--card-background);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.form-section h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.section-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ==================
   Calendar
   ================== */

.calendar-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.calendar-day {
    background: #f1f5f9;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.calendar-day:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.calendar-day.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.calendar-day .day-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    opacity: 0.8;
}

.calendar-day .day-date {
    font-size: 20px;
    font-weight: 700;
}

.calendar-day .month {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 5px;
}

/* ==================
   Guest Management
   ================== */

#guestsList {
    margin-bottom: 20px;
}

.guest-card {
    background: #f8fafc;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
}

.guest-card.primary-guest {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.guest-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.guest-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.remove-guest-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.remove-guest-btn:hover {
    background: #dc2626;
}

.guest-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
}

/* ==================
   Form Actions
   ================== */

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding: 30px;
    background: var(--card-background);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
    flex: 1;
    margin: 0;
}

.form-note {
    text-align: center;
    margin-top: 15px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ==================
   Confirmation Page
   ================== */

.confirmation-header {
    background: var(--card-background);
    border-radius: 16px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
}

.success-icon {
    font-size: 72px;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.confirmation-header h1 {
    font-size: 42px;
    color: var(--success-color);
    margin-bottom: 10px;
}

.confirmation-header h2 {
    font-size: 24px;
    color: var(--text-secondary);
}

.confirmation-card {
    background: var(--card-background);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.confirmation-card h3 {
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-primary);
}

.summary-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.summary-section:last-of-type {
    border-bottom: none;
}

.summary-section h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.summary-content {
    padding-left: 20px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.confirmation-note {
    background: #eff6ff;
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.confirmation-note p {
    color: var(--text-secondary);
}

.confirmation-note span {
    color: var(--primary-color);
    font-weight: 600;
}

.confirmation-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.confirmation-actions a {
    flex: 1;
}

/* ==================
   Footer
   ================== */

.footer {
    text-align: center;
    margin-top: 40px;
    padding: 25px;
    background: var(--card-background);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.contact-info {
    font-size: 14px;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* ==================
   Responsive Design
   ================== */

@media (max-width: 768px) {
    .header-animation h1 {
        font-size: 32px;
    }

    .celebration-icon {
        font-size: 36px;
    }

    .event-details h2 {
        font-size: 24px;
    }

    .login-card {
        padding: 25px;
    }

    .form-section {
        padding: 20px;
    }

    .calendar-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .guest-row {
        grid-template-columns: 1fr;
    }

    .form-actions,
    .confirmation-actions {
        flex-direction: column;
    }

    .confirmation-header {
        padding: 30px 20px;
    }

    .confirmation-header h1 {
        font-size: 32px;
    }
}

/* ==================
   PIN Entry
   ================== */

.pin-instruction {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 14px;
}

.pin-input-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.pin-digit {
    width: 60px !important;
    height: 70px;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    border: 3px solid var(--border-color) !important;
    border-radius: 12px !important;
    transition: all 0.3s ease;
    padding: 0 !important;
}

.pin-digit:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1) !important;
    transform: scale(1.05);
    outline: none;
}

.pin-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #fecaca;
}

/* ==================
   Loading States
   ================== */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
