/* Reset e configurações base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #1e40af 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
.header {
    position: relative;
    margin-bottom: 40px;
    color: #1e40af;
    overflow: hidden;
    border-radius: 20px;
    min-height: 300px;
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e0 100%);
    z-index: 1;
}

.header-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(30,64,175,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59,130,246,0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(30,64,175,0.05) 0%, transparent 50%);
    background-size: 300px 300px, 400px 400px, 200px 200px;
    animation: float 20s ease-in-out infinite;
}

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

.header-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 40px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 40px;
    align-items: center;
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.logo-img {
    max-height: 100px;
    width: auto;
    filter: drop-shadow(2px 2px 8px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1e40af;
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(30,64,175,0.3);
}

.logo-badge i {
    color: #ffd700;
}

.header-text {
    text-align: left;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1e40af;
    text-shadow: 2px 2px 4px rgba(30,64,175,0.1);
}

.subtitle {
    font-size: 1.2rem;
    color: #4a5568;
    font-weight: 400;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.5;
}

.subtitle i {
    color: #e53e3e;
    font-size: 1.1rem;
}

.header-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    color: #4a5568;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.stat-item:hover {
    background: #f8fafc;
    border-color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30,64,175,0.1);
}

.stat-item i {
    color: #1e40af;
    font-size: 1rem;
}

/* Formulário principal */
.survey-form {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.form-section {
    padding: 30px;
    border-bottom: 1px solid #f0f0f0;
}

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

.form-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    color: #4a5568;
    margin-bottom: 25px;
    font-weight: 600;
}

.form-section h2 i {
    color: #1e40af;
}

/* Grupos de formulário */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

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

/* Avaliação por estrelas */
.rating-group {
    text-align: center;
}

.rating-group label {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #4a5568;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.star {
    font-size: 2rem;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.star:hover,
.star.active {
    color: #ffd700;
    transform: scale(1.1);
}

.star i {
    pointer-events: none;
}

/* Escala de avaliação */
.rating-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
}

.rating-item label {
    font-weight: 500;
    color: #4a5568;
    margin: 0;
    min-width: 180px;
}

.rating-scale {
    display: flex;
    gap: 10px;
    align-items: center;
}

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

.rating-scale label {
    width: 40px;
    height: 40px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #718096;
    min-width: auto;
}

.rating-scale input[type="radio"]:checked + label {
    background: #1e40af;
    border-color: #1e40af;
    color: white;
    transform: scale(1.1);
}

.rating-scale label:hover {
    border-color: #1e40af;
    background: rgba(30, 64, 175, 0.1);
}

/* Opções de recomendação */
.recommendation-group label {
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: block;
}

.recommendation-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.recommendation-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.recommendation-option:hover {
    border-color: #1e40af;
    background: rgba(30, 64, 175, 0.05);
}

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

.recommendation-option input[type="radio"]:checked + .checkmark {
    background: #1e40af;
    border-color: #1e40af;
}

.recommendation-option input[type="radio"]:checked + .checkmark::after {
    display: block;
}

.recommendation-option input[type="radio"]:checked ~ i {
    color: #1e40af;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.recommendation-option i {
    font-size: 1.2rem;
    color: #718096;
    transition: color 0.3s ease;
}

/* Seção de compartilhamento */
.share-section {
    padding: 30px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-top: 1px solid #e2e8f0;
    text-align: center;
    animation: slideDown 0.5s ease;
}

.share-section h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.3rem;
    color: #1e40af;
    margin-bottom: 10px;
    font-weight: 600;
}

.share-section p {
    color: #4a5568;
    margin-bottom: 25px;
    font-size: 1rem;
}

/* Preview do card de compartilhamento */
.share-preview {
    margin: 25px 0;
    display: flex;
    justify-content: center;
}

.share-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 100%;
    overflow: hidden;
    border: 2px solid #e2e8f0;
}

.share-card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1e40af;
    border-bottom: 3px solid #1e40af;
}

.share-logo {
    height: 45px;
    width: auto;
    filter: none;
}

.share-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #1e40af;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.share-card-content {
    padding: 25px;
}

.share-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.share-stars {
    display: flex;
    gap: 2px;
}

.share-stars .star {
    color: #ffd700;
    font-size: 1.2rem;
}

.share-rating-text {
    font-weight: 600;
    color: #1e40af;
    font-size: 1.1rem;
}

.share-route,
.share-date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #4a5568;
    font-size: 0.9rem;
}

.share-route i,
.share-date i {
    color: #1e40af;
    width: 16px;
}

.share-message {
    margin: 20px 0;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 4px solid #1e40af;
}

.share-message p {
    margin: 0;
    font-style: italic;
    color: #2d3748;
    font-size: 1rem;
    line-height: 1.5;
}

.share-card-footer {
    background: #f8fafc;
    padding: 15px 25px;
    border-top: 1px solid #e2e8f0;
}

.share-hashtags {
    color: #1e40af;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Opções de texto personalizado */
.share-text-options {
    margin: 25px 0;
    text-align: left;
}

.share-text-options h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e40af;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.message-templates {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.template-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    background: white;
    color: #4a5568;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.template-btn:hover,
.template-btn.active {
    border-color: #1e40af;
    background: #1e40af;
    color: white;
}

.custom-message {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.custom-message:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
    font-family: inherit;
    min-width: 120px;
    justify-content: center;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.facebook-btn {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
}

.instagram-btn {
    background: linear-gradient(135deg, #e4405f 0%, #fd1d1d 50%, #fcb045 100%);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.download-btn {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.share-native-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    order: -1; /* Aparece primeiro */
}

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

/* Botões de ação */
.form-actions {
    padding: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    background: #f8fafc;
}

.submit-btn,
.reset-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.submit-btn {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(30, 64, 175, 0.3);
}

.reset-btn {
    background: #e2e8f0;
    color: #4a5568;
}

.reset-btn:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 30px 30px 20px;
    text-align: center;
    color: #4a5568;
}

.modal-header i {
    font-size: 3rem;
    color: #48bb78;
    margin-bottom: 15px;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-body {
    padding: 0 30px 20px;
    text-align: center;
    color: #718096;
}

.modal-footer {
    padding: 20px 30px 30px;
    text-align: center;
}

.modal-btn {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 64, 175, 0.3);
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        min-height: 250px;
    }
    
    .header-content {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 30px 25px;
        text-align: center;
    }
    
    .header-text {
        text-align: center;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
        justify-content: center;
    }
    
    .header-stats {
        justify-content: center;
        gap: 15px;
    }
    
    .logo-img {
        max-height: 80px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .rating-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .rating-item label {
        min-width: auto;
    }
    
    .recommendation-options {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .submit-btn,
    .reset-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .share-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .share-card {
        max-width: 350px;
    }
    
    .message-templates {
        justify-content: center;
    }
    
    .template-btn {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .header {
        min-height: 200px;
    }
    
    .header-content {
        padding: 25px 20px;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
        flex-direction: column;
        gap: 5px;
    }
    
    .header-stats {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .stat-item {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .logo-img {
        max-height: 70px;
    }
    
    .star-rating {
        gap: 2px;
    }
    
    .star {
        font-size: 1.5rem;
    }
    
    .rating-scale {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .share-card {
        max-width: 300px;
    }
    
    .share-card-header {
        padding: 15px;
    }
    
    .share-card-content {
        padding: 20px;
    }
    
    .message-templates {
        flex-direction: column;
    }
    
    .template-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Animações */
.form-section {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

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

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

/* Estados de validação */
.form-group input:invalid,
.form-group select:invalid {
    border-color: #e53e3e;
}

.form-group input:valid,
.form-group select:valid {
    border-color: #48bb78;
}

/* Loading state */
.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.submit-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
