/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --dark: #1e293b;
    --dark-light: #334155;
    --gray: #64748b;
    --gray-light: #cbd5e1;
    --gray-lighter: #f1f5f9;
    --white: #ffffff;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    min-height: 100vh;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 300;
}

/* Hero Section */
.hero {
    padding: 3rem 0;
    text-align: center;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

/* Main Content */
.main-content {
    padding: 2rem 0 4rem;
}

.party-form {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Form Section */
.form-section {
    padding: 2.5rem;
    border-bottom: 1px solid var(--gray-lighter);
}

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

.section-header {
    margin-bottom: 2rem;
}

.step-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.section-desc {
    color: var(--gray);
    font-size: 0.95rem;
}

/* Calendar */
.calendar-container {
    background: var(--gray-lighter);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
}

.calendar-nav {
    background: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--dark);
    transition: var(--transition);
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.calendar-nav:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.05);
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    min-height: 40px;
    font-size: 0.95rem;
}

.calendar-day.header {
    background: transparent;
    cursor: default;
    font-weight: 600;
    color: var(--gray);
    font-size: 0.875rem;
}

.calendar-day.disabled {
    background: transparent;
    color: var(--gray-light);
    cursor: not-allowed;
}

.calendar-day.today {
    border-color: var(--primary-light);
}

.calendar-day.today::after {
    content: 'TODAY';
    position: absolute;
    bottom: 2px;
    font-size: 0.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.calendar-day:not(.disabled):not(.header):hover {
    background: var(--primary-light);
    color: var(--white);
    transform: scale(1.05);
}

.calendar-day.selected {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow);
}

.selected-date {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    text-align: center;
    font-weight: 600;
    color: var(--dark);
}

/* Party Selection */
.party-selection {
    margin-top: 2rem;
}

.party-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.party-option input[type="radio"] {
    display: none;
}

.party-card {
    padding: 1.5rem;
    background: var(--gray-lighter);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.party-option input[type="radio"]:checked + .party-card {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-dark);
    box-shadow: var(--shadow);
}

.party-card h5 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.party-card p {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.party-time {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.party-option input[type="radio"]:checked + .party-card .party-time {
    background: rgba(255, 255, 255, 0.2);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.required {
    color: var(--danger-color);
}

input[type="text"],
input[type="tel"],
input[type="number"],
select {
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
    font-family: inherit;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-hint {
    margin-top: 0.375rem;
    font-size: 0.875rem;
    color: var(--gray);
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 1rem;
}

.radio-button {
    flex: 1;
    position: relative;
}

.radio-button input[type="radio"] {
    display: none;
}

.radio-button span {
    display: block;
    padding: 0.875rem;
    background: var(--gray-lighter);
    border: 2px solid transparent;
    border-radius: var(--border-radius-sm);
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.radio-button input[type="radio"]:checked + span {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-dark);
}

/* Participation Options */
.participation-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.participation-card input[type="radio"] {
    display: none;
}

.participation-content {
    padding: 1.5rem;
    background: var(--gray-lighter);
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.participation-card input[type="radio"]:checked + .participation-content {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-dark);
    box-shadow: var(--shadow);
}

.participation-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.participation-content h5 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.participation-content p {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Upload Area */
.upload-area {
    position: relative;
    border: 2px dashed var(--gray-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.02);
}

.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-content svg {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-text {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--gray);
}

.preview-container {
    position: relative;
    max-width: 300px;
    margin: 0 auto;
}

.preview-container img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: var(--danger-color);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.remove-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.info-box {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: rgba(99, 102, 241, 0.05);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius-sm);
}

.info-box p {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.info-box ul {
    margin-left: 1.25rem;
}

.info-box li {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 0.375rem;
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.checkbox-button {
    position: relative;
}

.checkbox-button input[type="checkbox"] {
    display: none;
}

.checkbox-button span {
    display: block;
    padding: 0.875rem;
    background: var(--gray-lighter);
    border: 2px solid transparent;
    border-radius: var(--border-radius-sm);
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.checkbox-button input[type="checkbox"]:checked + span {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-dark);
}

/* Terms Container */
.terms-container {
    background: var(--gray-lighter);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    cursor: pointer;
    position: relative;
}

.checkbox-label.all-agree {
    font-weight: 700;
    font-size: 1.125rem;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.terms-divider {
    height: 1px;
    background: var(--gray-light);
    margin: 0.75rem 0;
}

.terms-link {
    margin-left: auto;
    background: var(--white);
    border: 1px solid var(--gray-light);
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.terms-link:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Submit Container */
.submit-container {
    padding: 2.5rem;
    text-align: center;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.125rem 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    color: var(--white);
}

.footer p {
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-lighter);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--dark);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    line-height: 1.8;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header {
        padding: 1.5rem 0;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 0.9rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .main-content {
        padding: 1rem 0 2rem;
    }

    .form-section {
        padding: 1.5rem 1rem;
    }

    .section-header {
        margin-bottom: 1.5rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .section-desc {
        font-size: 0.875rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* Calendar responsive */
    .calendar-container {
        padding: 1rem;
    }

    .calendar-header {
        margin-bottom: 1rem;
    }

    .calendar-title {
        font-size: 1.125rem;
    }

    .calendar-nav {
        width: 36px;
        height: 36px;
    }

    .calendar-nav svg {
        width: 20px;
        height: 20px;
    }

    .calendar {
        gap: 0.375rem;
    }

    .calendar-day {
        font-size: 0.875rem;
        min-height: 36px;
        border-radius: 6px;
    }

    .calendar-day.today::after {
        font-size: 0.45rem;
        bottom: 1px;
    }

    .selected-date {
        margin-top: 1rem;
        padding: 0.875rem;
        font-size: 0.9rem;
    }

    /* Party selection responsive */
    .party-options {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .party-card {
        padding: 1.25rem;
    }

    .party-card h5 {
        font-size: 1.125rem;
    }

    .party-card p {
        font-size: 0.875rem;
    }

    /* Participation options responsive */
    .participation-options {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .participation-content {
        padding: 1.25rem;
    }

    .participation-icon {
        font-size: 1.75rem;
    }

    .participation-content h5 {
        font-size: 1rem;
    }

    /* Upload area responsive */
    .upload-area {
        padding: 1.5rem 1rem;
    }

    .upload-content svg {
        width: 40px;
        height: 40px;
    }

    .upload-text {
        font-size: 0.95rem;
    }

    .upload-hint {
        font-size: 0.8rem;
    }

    .info-box {
        padding: 1rem;
        font-size: 0.875rem;
    }

    .info-box li {
        font-size: 0.85rem;
    }

    /* Checkbox grid responsive */
    .checkbox-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }

    .checkbox-button span {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    /* Terms responsive */
    .terms-container {
        padding: 1.25rem;
    }

    .checkbox-label {
        padding: 0.625rem 0;
        font-size: 0.9rem;
    }

    .checkbox-label.all-agree {
        font-size: 1rem;
    }

    .checkbox-label input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin-right: 0.625rem;
    }

    .terms-link {
        padding: 0.25rem 0.625rem;
        font-size: 0.8rem;
    }

    /* Submit button responsive */
    .submit-container {
        padding: 1.5rem 1rem;
    }

    .submit-btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .submit-btn svg {
        width: 18px;
        height: 18px;
    }

    /* Modal responsive */
    .modal {
        padding: 15px;
    }

    .modal-content {
        max-height: 90vh;
    }

    .modal-header {
        padding: 1.25rem;
    }

    .modal-header h3 {
        font-size: 1.125rem;
    }

    .modal-body {
        padding: 1.25rem;
        font-size: 0.9rem;
    }

    .modal-body h4 {
        font-size: 1rem;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }

    /* Footer responsive */
    .footer {
        padding: 1.5rem 0;
        font-size: 0.875rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Radio button responsive */
    .radio-group {
        gap: 0.75rem;
    }

    .radio-button span {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    /* Form inputs responsive */
    input[type="text"],
    input[type="tel"],
    input[type="number"],
    select {
        padding: 0.75rem 0.875rem;
        font-size: 0.95rem;
    }

    .form-hint {
        font-size: 0.8rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.75rem;
    }

    .hero-title {
        font-size: 1.375rem;
    }

    .form-section {
        padding: 1.25rem 0.875rem;
    }

    .section-title {
        font-size: 1.125rem;
    }

    .calendar-container {
        padding: 0.5rem;
    }

    .calendar {
        gap: 2px;
    }

    .calendar-day {
        font-size: 0.75rem;
        min-height: 28px;
        border-radius: 4px;
    }

    .calendar-day.header {
        font-size: 0.7rem;
    }

    .calendar-day.today::after {
        display: none;
    }

    .calendar-nav {
        width: 28px;
        height: 28px;
    }

    .calendar-nav svg {
        width: 16px;
        height: 16px;
    }

    .calendar-title {
        font-size: 0.95rem;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .step-badge {
        padding: 0.3rem 0.75rem;
        font-size: 0.7rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 360px) {
    .calendar-container {
        padding: 0.375rem;
    }

    .calendar {
        gap: 1px;
    }

    .calendar-day {
        font-size: 0.7rem;
        min-height: 26px;
        border-radius: 3px;
    }

    .calendar-day.header {
        font-size: 0.65rem;
    }

    .calendar-nav {
        width: 26px;
        height: 26px;
    }

    .calendar-nav svg {
        width: 14px;
        height: 14px;
    }

    .calendar-title {
        font-size: 0.875rem;
    }

    .calendar-header {
        margin-bottom: 0.5rem;
    }
}

/* Large tablets and small desktops */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 720px;
    }

    .form-section {
        padding: 2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    animation: fadeIn 0.6s ease-out;
}
