html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.invitation-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.header-section {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
}

.page-title {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.page-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 0;
    font-weight: 300;
}

.invitation-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

    .form-section:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

.section-title {
    color: #495057;
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
    border-left: 4px solid #007bff;
}

.image-selection {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.image-option {
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

    .image-option:hover {
        transform: translateY(-5px);
    }

.image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.selectable-img {
    width: 180px;
    height: 240px;
    object-fit: cover;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    display: block;
}

.selection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .selection-overlay i {
        color: white;
        font-size: 3rem;
    }

input[type="radio"]:checked + .image-wrapper {
    border: 3px solid #007bff;
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.3);
}

    input[type="radio"]:checked + .image-wrapper .selection-overlay {
        opacity: 1;
    }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-actions {
    text-align: center;
    padding-top: 1.5rem;
}

.results-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
    border: 1px solid #e9ecef;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.download-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-download {
    background: #28a745;
    color: white;
}

    .btn-download:hover {
        background: #218838;
        color: white;
        text-decoration: none;
    }

.btn-view {
    background: #17a2b8;
    color: white;
}

    .btn-view:hover {
        background: #138496;
        color: white;
        text-decoration: none;
    }

/* Responsive Design */
@media (max-width: 768px) {
    .invitation-container {
        padding: 1rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .invitation-form {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .image-selection {
        flex-direction: column;
        align-items: center;
    }

    .selectable-img {
        width: 160px;
        height: 200px;
    }

    .download-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.8rem;
    }

    .selectable-img {
        width: 140px;
        height: 180px;
    }
}
