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

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

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

.header {
    background: #2c3e50;
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 300;
}

.header p {
    opacity: 0.9;
    font-size: 16px;
}

.form-container {
    padding: 40px;
}

.section {
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.2s; }
.section:nth-child(4) { animation-delay: 0.3s; }
.section:nth-child(5) { animation-delay: 0.4s; }
.section:nth-child(6) { animation-delay: 0.5s; }

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

.section-title {
    color: #2c3e50;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
    display: inline-block;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 250px;
}

.form-group.full-width {
    flex: 100%;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
    font-size: 14px;
}

input[type="text"],
input[type="tel"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 15px;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

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

.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 5px;
    border-radius: 5px;
    -webkit-tap-highlight-color: transparent;
}

.radio-item:hover {
    transform: scale(1.05);
}

input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #bdc3c7;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

input[type="radio"]:checked {
    border-color: #3498db;
    background: #3498db;
}

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

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.checkbox-item:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #bdc3c7;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

input[type="checkbox"]:checked {
    border-color: #27ae60;
    background: #27ae60;
}

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

.input-with-addon {
    position: relative;
}

.input-addon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    font-size: 14px;
}

.submit-section {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #ecf0f1;
}

.submit-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 18px 50px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(39, 174, 96, 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(39, 174, 96, 0.4);
}

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

.progress-bar {
    height: 4px;
    background: #ecf0f1;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 30px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #27ae60;
    display: none;
}

/* Responsividade para tablets */
@media (max-width: 1024px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .form-container {
        padding: 30px;
    }
}

/* Responsividade para tablets pequenos */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        margin: 0;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    .header p {
        font-size: 14px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .section {
        margin-bottom: 30px;
    }
    
    .section-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .radio-group,
    .checkbox-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .radio-item,
    .checkbox-item {
        justify-content: flex-start;
    }
    
    input[type="text"],
    input[type="tel"],
    input[type="date"],
    textarea,
    select {
        padding: 12px;
        font-size: 16px; /* Evita zoom no iOS */
    }
    
    .submit-btn {
        padding: 15px 40px;
        font-size: 16px;
        width: 100%;
        border-radius: 10px;
    }
}

/* Responsividade para smartphones */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .container {
        border-radius: 5px;
    }
    
    .header {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    .header p {
        font-size: 13px;
    }
    
    .form-container {
        padding: 15px;
    }
    
    .section {
        margin-bottom: 25px;
    }
    
    .section-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .form-row {
        gap: 12px;
        margin-bottom: 15px;
    }
    
    label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    input[type="text"],
    input[type="tel"],
    input[type="date"],
    textarea,
    select {
        padding: 10px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    textarea {
        min-height: 80px;
    }
    
    .radio-group,
    .checkbox-group {
        gap: 8px;
    }
    
    .radio-item,
    .checkbox-item {
        padding: 6px 10px;
        border-radius: 6px;
    }
    
    .radio-item label,
    .checkbox-item label {
        font-size: 14px;
        margin-bottom: 0;
    }
    
    input[type="radio"],
    input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
    
    .submit-btn {
        padding: 12px 30px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .progress-bar {
        height: 3px;
        margin-bottom: 20px;
    }
}

/* Responsividade para telas muito pequenas */
@media (max-width: 320px) {
    .header h1 {
        font-size: 16px;
    }
    
    .header p {
        font-size: 12px;
    }
    
    .form-container {
        padding: 10px;
    }
    
    .section-title {
        font-size: 15px;
    }
    
    input[type="text"],
    input[type="tel"],
    input[type="date"],
    textarea,
    select {
        padding: 8px;
        font-size: 15px;
    }
    
    .submit-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Melhorias para acessibilidade em dispositivos móveis */
@media (hover: none) and (pointer: coarse) {
    .radio-item,
    .checkbox-item {
        min-height: 44px; /* Área de toque mínima recomendada */
        display: flex;
        align-items: center;
    }
    
    input[type="radio"],
    input[type="checkbox"] {
        min-width: 20px;
        min-height: 20px;
    }
    
    .submit-btn {
        min-height: 44px;
    }
}

/* Orientação paisagem em dispositivos móveis */
@media (max-width: 768px) and (orientation: landscape) {
    .header {
        padding: 15px 20px;
    }
    
    .header h1 {
        font-size: 18px;
        margin-bottom: 3px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .section {
        margin-bottom: 20px;
    }
}

.floating-label {
    position: relative;
    margin-bottom: 20px;
}

.floating-label input {
    background: transparent;
    border: none;
    border-bottom: 2px solid #ecf0f1;
    border-radius: 0;
    padding: 15px 0 10px 0;
    transition: all 0.3s ease;
}

.floating-label label {
    position: absolute;
    top: 15px;
    left: 0;
    color: #7f8c8d;
    transition: all 0.3s ease;
    pointer-events: none;
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 12px;
    color: #3498db;
}

.floating-label input:focus {
    border-bottom-color: #3498db;
}