@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

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

body {
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
}

html {
    height: 100%;
}

/* Animated Background */
#grad1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 30%, #f093fb 70%, #f5576c 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
    position: relative;
    overflow: hidden;
}

#grad1::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    top: -80px;
    left: -80px;
    animation: float 6s ease-in-out infinite;
}

#grad1::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    bottom: -60px;
    right: -60px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes checkmark {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    60% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes progressFill {
    from { width: 0%; }
    to { width: 100%; }
}

/* Outer wrapper */
.col-11.col-sm-9.col-md-7.col-lg-6.text-center.p-0.mt-3.mb-2 {
    border: none !important;
    border-radius: 0 !important;
    max-width: 600px;
    width: 100%;
}

/* Card */
.card {
    z-index: 1;
    border: none;
    border-radius: 24px !important;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
    animation: slideInUp 0.6s ease both;
    position: relative;
}

/* Card Header */
.card > h2 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 28px 20px 20px;
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 3px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Progress bar container */
#progressbar {
    margin: 0;
    padding: 20px 30px 10px;
    overflow: hidden;
    color: lightgrey;
    background: #f8f9ff;
    border-bottom: 1px solid #eee;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

#progressbar .active {
    color: #667eea;
}

#progressbar li {
    list-style-type: none;
    font-size: 11px;
    font-weight: 600;
    width: 25%;
    float: left;
    position: relative;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.4s ease;
}

#progressbar li.active {
    color: #667eea;
}

/* Icons in the ProgressBar */
#progressbar #account:before { font-family: FontAwesome; content: "\f007"; }
#progressbar #personal:before { font-family: FontAwesome; content: "\f118"; }
#progressbar #payment:before { font-family: FontAwesome; content: "\f075"; }
#progressbar #confirm:before { font-family: FontAwesome; content: "\f00c"; }

/* Progress circles */
#progressbar li:before {
    width: 46px;
    height: 46px;
    line-height: 42px;
    display: block;
    font-size: 16px;
    color: #ccc;
    background: white;
    border-radius: 50%;
    margin: 0 auto 10px auto;
    border: 3px solid #e0e0e0;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

#progressbar li.active:before {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 15px rgba(102,126,234,0.5);
    animation: pulse 2s ease infinite;
}

/* Progress connectors */
#progressbar li:after {
    content: '';
    width: 100%;
    height: 3px;
    background: #e0e0e0;
    position: absolute;
    left: -50%;
    top: 22px;
    z-index: 0;
    transition: background 0.4s ease;
}

#progressbar li:first-child:after { display: none; }

#progressbar li.active:after {
    background: linear-gradient(90deg, #667eea, #764ba2);
}

/* Form */
#msform {
    text-align: center;
    position: relative;
    margin-top: 0;
    background: white;
}

#msform fieldset {
    background: white;
    border: 0 none;
    border-radius: 0;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding-bottom: 10px;
    position: relative;
    animation: fadeInScale 0.4s ease both;
}

#msform fieldset:not(:first-of-type) {
    display: none;
}

#msform fieldset .form-card {
    background: white;
    border: 0 none;
    padding: 30px 40px 20px 40px;
    box-sizing: border-box;
    width: 100%;
    text-align: left;
    color: #666;
}

/* FieldSet headings */
.fs-title {
    font-size: 18px;
    color: #2d3748;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: left;
    line-height: 1.4;
}

/* Inputs */
#msform input.personal-form-field,
#msform select.personal-form-field {
    padding: 14px 16px;
    border: 2px solid #e8ecf4;
    border-radius: 12px;
    margin-bottom: 16px;
    margin-top: 2px;
    width: 100%;
    font-family: 'Poppins', sans-serif;
    color: #2d3748;
    font-size: 14px;
    background: #f8f9ff;
    transition: all 0.3s ease;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

#msform input.personal-form-field:focus,
#msform select.personal-form-field:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
    transform: translateY(-2px);
}

#msform input.personal-form-field::placeholder {
    color: #aab;
}

/* Select */
select#services,
select.personal-form-field {
    font-family: 'Poppins', sans-serif;
    color: #2d3748;
    font-size: 14px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23667eea' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px !important;
}

/* ===== STEP 2: EMOJI RATING ===== */
.emoji-rating-wrapper {
    margin: 10px 0 20px;
}

.emoji-rating-title {
    font-size: 14px;
    font-weight: 500;
    color: #888;
    margin-bottom: 20px;
    text-align: center;
}

.emoji-options {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.emoji-option {
    flex: 1;
    min-width: 70px;
    position: relative;
}

.emoji-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.emoji-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    border: 2px solid #e8ecf4;
    border-radius: 16px;
    cursor: pointer;
    background: #f8f9ff;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
}

.emoji-option label:hover {
    border-color: #667eea;
    background: white;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102,126,234,0.2);
}

.emoji-face {
    font-size: 36px;
    line-height: 1;
    transition: transform 0.3s ease;
    display: block;
}

.emoji-option label:hover .emoji-face {
    transform: scale(1.2) rotate(-5deg);
}

.emoji-label-text {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    transition: color 0.3s ease;
    text-align: center;
    line-height: 1.2;
}

/* Selected emoji state */
.emoji-option input[type="radio"]:checked + label {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f3ff, #e8eeff);
    box-shadow: 0 8px 24px rgba(102,126,234,0.25);
    transform: translateY(-6px) scale(1.05);
}

.emoji-option input[type="radio"]:checked + label .emoji-face {
    animation: bounceIn 0.4s ease both;
}

.emoji-option input[type="radio"]:checked + label .emoji-label-text {
    color: #667eea;
}

/* Color variants per rating */
.emoji-option:nth-child(1) input:checked + label { border-color: #ff5252; background: linear-gradient(135deg, #fff5f5, #ffe8e8); box-shadow: 0 8px 24px rgba(255,82,82,0.25); }
.emoji-option:nth-child(1) input:checked + label .emoji-label-text { color: #ff5252; }
.emoji-option:nth-child(2) input:checked + label { border-color: #ff9800; background: linear-gradient(135deg, #fff8f0, #ffecd8); box-shadow: 0 8px 24px rgba(255,152,0,0.25); }
.emoji-option:nth-child(2) input:checked + label .emoji-label-text { color: #ff9800; }
.emoji-option:nth-child(3) input:checked + label { border-color: #ffc107; background: linear-gradient(135deg, #fffdf0, #fff9d8); box-shadow: 0 8px 24px rgba(255,193,7,0.25); }
.emoji-option:nth-child(3) input:checked + label .emoji-label-text { color: #ffc107; }
.emoji-option:nth-child(4) input:checked + label { border-color: #4caf50; background: linear-gradient(135deg, #f0fff4, #e0f7e9); box-shadow: 0 8px 24px rgba(76,175,80,0.25); }
.emoji-option:nth-child(4) input:checked + label .emoji-label-text { color: #4caf50; }

/* Error message */
span#flexRadioDefault-error, span.emoji-error {
    display: block;
    color: #f56565 !important;
    font-size: 12px;
    margin-top: -10px;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 500;
}

span.help-block {
    color: #f56565 !important;
    font-size: 12px;
    display: block;
    margin-top: -12px;
    margin-bottom: 10px;
}

/* Textarea */
textarea.msg {
    padding: 14px 16px !important;
    border: 2px solid #e8ecf4 !important;
    border-radius: 12px !important;
    width: 100%;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #2d3748;
    background: #f8f9ff;
    resize: vertical;
    transition: all 0.3s ease;
    outline: none;
}

textarea.msg:focus {
    border-color: #667eea !important;
    background: white;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
}

textarea.msg::placeholder { color: #aab; }

/* Buttons */
.btn-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 40px 24px;
    background: white;
}

#msform .action-button {
    flex: 1;
    max-width: 160px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: white;
    border: 0 none;
    border-radius: 50px;
    cursor: pointer;
    padding: 13px 20px;
    margin: 0;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
    position: relative;
    overflow: hidden;
}

#msform .action-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.3s ease;
}

#msform .action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.5);
}

#msform .action-button:hover::after {
    background: rgba(255,255,255,0.1);
}

#msform .action-button:active {
    transform: translateY(0);
}

#msform .action-button-previous {
    flex: 1;
    max-width: 160px;
    background: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 50px;
    cursor: pointer;
    padding: 11px 20px;
    margin: 0;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

#msform .action-button-previous:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

/* Success screen */
#success .form-card {
    text-align: center !important;
    padding: 40px !important;
}

.success-icon-wrap {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: checkmark 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    box-shadow: 0 15px 40px rgba(67,233,123,0.4);
}

.success-icon-wrap i {
    font-size: 40px;
    color: white;
}

#success .fs-title {
    text-align: center !important;
    font-size: 26px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

#success .success-msg {
    color: #888;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
}

/* Confetti dots */
.confetti-container {
    position: relative;
    height: 30px;
    margin-bottom: 10px;
    overflow: hidden;
}

.confetti-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: confettiFall 1s ease both;
}

@keyframes confettiFall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(30px) rotate(360deg); opacity: 0; }
}

/* Input label floats */
.input-group-custom {
    position: relative;
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 576px) {
    #msform fieldset .form-card {
        padding: 20px 20px 10px;
    }
    .btn-row {
        padding: 0 20px 20px;
    }
    .emoji-face {
        font-size: 28px;
    }
    .emoji-options {
        gap: 6px;
    }
    .emoji-option label {
        padding: 10px 6px;
    }
}
