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

:root {
    --primary-color: #dfffc0;
    --primary-dark: #c5e6a7;
    --secondary-color: #10b981;
    --text-dark: #e5e7eb;
    --text-light: #9ca3af;
    --border-color: #374151;
    --bg-light: #111111;
    --white: #ffffff;
    --form-bg: #1c1b1b;
    --error-color: #ef4444;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: url('form-background2.png') center center / cover no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    padding: 2rem 1rem;
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--form-bg);
    border: none !important;
    border-radius: 16px;
    box-shadow: none;
    overflow: hidden;
}

header {
    background: var(--form-bg);
    color: var(--white);
    padding: 3rem 2rem 1.5rem;
    text-align: center;
}

.logo {
    width: 280px !important;
    max-width: 280px !important;
    height: auto;
    margin-bottom: 1.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Progress Bar */
.progress-container {
    padding: 1rem 2rem 1rem;
    background: var(--form-bg);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    width: 14.28%; /* 1/7 steps */
    transition: width 0.4s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.progress-step {
    flex: 1;
    text-align: center;
    cursor: default;
    transition: all 0.3s ease;
}

.progress-step.active,
.progress-step.completed {
    cursor: pointer;
}

.progress-step.active:hover .step-number,
.progress-step.completed:hover .step-number {
    color: var(--primary-color);
}

.progress-step.active:hover .step-label,
.progress-step.completed:hover .step-label {
    color: var(--primary-color);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.25rem;
    font-weight: 600;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: transparent;
    color: var(--primary-color);
}

.progress-step.completed .step-number {
    background: transparent;
    color: var(--white);
}

.step-label {
    font-size: 0.95rem;
    color: var(--white);
    font-weight: 500;
    transition: all 0.3s ease;
}

.progress-step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.progress-step.completed .step-label {
    color: var(--white);
}

.project-form {
    padding: 2rem;
    position: relative;
    min-height: 500px;
}

/* Multi-step form */
.form-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.form-step.active {
    display: block;
}

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

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: none;
}

.form-section h2 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-style: italic;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--white);
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select {
    width: 100%;
    height: 44px;
    padding: 0 1rem;
    border: 1px solid var(--white);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--white);
    color: #1c1b1b;
}

.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--white);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--white);
    color: #1c1b1b;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(223, 255, 192, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.checkbox-group,
.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: transparent;
}

.checkbox-label:hover,
.radio-label:hover {
    background: var(--primary-color);
}

.checkbox-label:hover span,
.radio-label:hover span {
    color: #1c1b1b;
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--white);
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid var(--white);
    border-radius: 3px;
    background: transparent;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked,
.radio-label input[type="radio"]:checked {
    background: var(--white);
    border-color: var(--white);
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #1c1b1b;
    font-size: 14px;
    font-weight: bold;
}

.radio-label input[type="radio"] {
    border-radius: 50%;
}

.radio-label input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1c1b1b;
}

.checkbox-label span,
.radio-label span {
    font-size: 0.95rem;
    color: var(--white);
    transition: color 0.3s ease;
}

.color-input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.color-input-wrapper input[type="color"] {
    width: 60px;
    height: 45px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    padding: 4px;
}

.color-input-wrapper input[type="text"] {
    flex: 1;
    background: var(--bg-light);
    cursor: default;
}

/* Page Fields */
#pagesContainer {
    margin-top: 1.5rem;
}

.page-field {
    background: rgba(255, 255, 255, 0.03);
    border: none;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.page-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.page-field-number {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-remove-page {
    background: transparent;
    border: none;
    color: #F47174;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-remove-page:hover {
    background: #F47174;
    color: var(--white);
}

.btn-add-page {
    width: 100%;
    height: 50px;
    padding: 0 1.5rem;
    background: transparent;
    border: 1px solid var(--white);
    border-radius: 40px;
    color: var(--white);
    font-size: 1rem;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-page:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #1c1b1b;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.btn-prev,
.btn-next {
    height: 50px;
    padding: 0 2.5rem;
    font-size: 1.125rem;
    font-weight: normal;
    border: 1px solid var(--white);
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    background: transparent;
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-prev:hover,
.btn-next:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #1c1b1b;
}

.btn-prev:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-prev:disabled:hover {
    background: transparent;
    border-color: var(--white);
    color: var(--white);
}

.btn-submit,
.btn-reset {
    height: 50px;
    padding: 0 2.5rem;
    font-size: 1.125rem;
    font-weight: normal;
    border: 1px solid var(--white);
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    background: transparent;
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-submit:hover,
.btn-reset:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #1c1b1b;
}

.success-message {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: var(--white);
    padding: 1.5rem 2rem;
    text-align: center;
    margin: 2rem;
    border-radius: 12px;
    animation: slideIn 0.5s ease;
}

.success-message h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--white);
    font-style: italic;
}

.success-message p {
    font-size: 1rem;
    opacity: 0.95;
}

.error-message {
    background: var(--error-color);
    color: var(--white);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2);
}

.error-message::before {
    content: "⚠";
    font-size: 1.5rem;
    flex-shrink: 0;
}

.error-message p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

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

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

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

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    position: relative;
    vertical-align: middle;
}

.spinner::before {
    content: '';
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    margin-left: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

/* Responsive Design */

/* Tablet (iPad) - Landscape */
@media (max-width: 1024px) and (min-width: 769px) and (orientation: landscape) {
    body {
        padding: 1rem;
    }

    .container {
        max-width: 95%;
    }

    .project-form {
        min-height: auto;
    }

    .progress-steps {
        gap: 0.5rem;
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .step-label {
        font-size: 0.8rem;
    }

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

    .checkbox-group,
    .radio-group {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet (iPad) - Portrait */
@media (max-width: 1024px) and (min-width: 769px) and (orientation: portrait) {
    body {
        padding: 0.5rem;
    }

    .container {
        max-width: 90%;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .project-form {
        min-height: auto;
    }

    .progress-steps {
        gap: 0.3rem;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .step-label {
        font-size: 0.7rem;
    }

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

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

/* Mobile Landscape */
@media (max-width: 768px) and (orientation: landscape) {
    .logo {
        width: 260px !important;
        max-width: 260px !important;
    }
}

/* Mobile and Small Tablets - up to 768px */
@media (max-width: 768px) {
    body {
        padding: 0;
        background: var(--form-bg);
    }

    .container {
        border-radius: 0;
        min-height: 100vh;
    }

    .logo {
        width: 240px !important;
        max-width: 240px !important;
    }

    header {
        padding: 2rem 1.5rem 1rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    /* Hide progress bar and steps on mobile */
    .progress-container {
        display: none !important;
    }

    /* Show all form steps at once */
    .form-step {
        display: block !important;
        opacity: 1 !important;
        margin-bottom: 2rem;
        padding-bottom: 2rem;
        border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    }

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

    .project-form {
        padding: 1.5rem;
        min-height: auto;
    }

    .form-section h2 {
        font-size: 1.35rem;
    }

    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    /* Make main section labels bigger and bold on mobile */
    .form-group > label {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        margin-bottom: 0.6rem !important;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group input[type="date"],
    .form-group select {
        height: 38px;
        padding: 0 0.75rem;
        font-size: 16px;
    }

    .form-group textarea {
        padding: 0.6rem 0.75rem;
        font-size: 16px;
    }

    /* Hide navigation buttons on mobile */
    .form-navigation {
        display: flex;
        flex-direction: column;
    }

    .btn-prev,
    .btn-next {
        display: none !important;
    }

    .btn-submit {
        display: block !important;
        width: 100%;
        height: 44px;
        font-size: 1rem;
    }

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

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

/* Small phones - up to 480px */
@media (max-width: 480px) {
    body {
        padding: 0;
    }

    .logo {
        width: 240px !important;
        max-width: 240px !important;
    }

    header {
        padding: 1.5rem 1rem 0.75rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .project-form {
        padding: 1rem;
    }

    .form-section h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group input[type="date"],
    .form-group select {
        height: 36px;
        padding: 0 0.65rem;
        font-size: 16px;
    }

    .form-group textarea {
        padding: 0.5rem 0.65rem;
        font-size: 16px;
    }

    .btn-submit {
        height: 42px;
        padding: 0 1.5rem;
        font-size: 0.95rem;
    }
}

/* Form Validation Styles */
input:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: var(--error-color);
}

input:valid:not(:placeholder-shown),
select:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: var(--white);
}

/* Override validation styles for checkboxes and radio buttons */
.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    border-color: var(--white) !important;
}

.checkbox-label input[type="checkbox"]:checked,
.radio-label input[type="radio"]:checked {
    border-color: var(--white) !important;
}

