/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Survey Selector Styles */
.survey-selector {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin: 40px auto;
    max-width: 800px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1rem;
    color: #718096;
}

.survey-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.survey-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.survey-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.survey-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.survey-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    text-align: center;
}

.survey-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    text-align: center;
}

.survey-card p {
    color: #718096;
    margin-bottom: 20px;
    text-align: center;
}

.card-features {
    margin-bottom: 25px;
}

.feature {
    display: block;
    color: #4a5568;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.start-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.survey-card:hover .start-button {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: scale(1.05);
}

.footer-info {
    text-align: center;
    color: #718096;
    font-size: 0.9rem;
}

/* Survey Container */
.survey-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.survey-header {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.survey-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.survey-subtitle {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.progress-bar {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: #718096;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Survey Form */
.survey-form {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.question-section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.question-section.active {
    display: block;
}

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

.section-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.section-quote {
    font-style: italic;
    color: #718096;
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
}

.question-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.question {
    margin-bottom: 25px;
}

.question label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.question-help {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-style: italic;
}

.question input[type="text"],
.question input[type="email"],
.question select,
.question textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.question input[type="text"]:focus,
.question input[type="email"]:focus,
.question select:focus,
.question textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

/* Rating Options */
.rating-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

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

.rating-option:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.rating-option input[type="radio"] {
    margin-right: 15px;
    transform: scale(1.2);
}

.rating-option input[type="radio"]:checked + .rating-text {
    color: #667eea;
    font-weight: 600;
}

.rating-option:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #f0f4ff;
}

.rating-text {
    font-size: 1rem;
    color: #4a5568;
    transition: all 0.3s ease;
}

/* Communication Options */
.communication-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.communication-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    justify-content: center;
}

.communication-option:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.communication-option input[type="radio"] {
    margin-right: 8px;
}

.communication-option:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #f0f4ff;
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

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

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

.btn-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

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

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

.modal-header {
    padding: 30px 30px 20px;
    text-align: center;
    border-bottom: 2px solid #e2e8f0;
}

.modal-header h2 {
    color: #2d3748;
    font-size: 1.8rem;
    font-weight: 700;
}

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

.modal-body p {
    color: #718096;
    font-size: 1.1rem;
    line-height: 1.6;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .container {
        padding: 10px;
        max-width: 100%;
    }
    
    .survey-selector {
        padding: 20px;
        margin: 10px auto;
        border-radius: 16px;
    }
    
    .header {
        margin-bottom: 30px;
    }
    
    .header h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .survey-options {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .survey-card {
        padding: 25px;
        margin-bottom: 0;
    }
    
    .card-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .survey-card h3 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .survey-card p {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }
    
    .card-features {
        margin-bottom: 20px;
    }
    
    .feature {
        font-size: 0.85rem;
        display: block;
        margin-bottom: 5px;
    }
    
    .start-button {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .survey-container {
        padding: 10px;
        margin: 10px auto;
    }
    
    .survey-header {
        padding: 20px;
        text-align: center;
    }
    
    .survey-header h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .survey-subtitle {
        font-size: 1rem;
    }
    
    .progress-bar {
        margin: 15px 0;
    }
    
    .progress-text {
        font-size: 0.9rem;
    }
    
    .survey-form {
        padding: 15px;
    }
    
    .question-section {
        margin-bottom: 20px;
    }
    
    .section-header {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .section-header h2 {
        font-size: 1.4rem;
        line-height: 1.3;
    }
    
    .section-quote {
        font-size: 0.9rem;
        margin-top: 10px;
    }
    
    .question-card {
        padding: 20px 15px;
    }
    
    .question {
        margin-bottom: 25px;
    }
    
    .question label {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 15px;
    }
    
    .question-help {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
    
    .rating-options {
        gap: 8px;
        flex-direction: column;
    }
    
    .rating-option {
        padding: 15px 12px;
        margin-bottom: 8px;
        border-radius: 8px;
    }
    
    .rating-text {
        font-size: 0.9rem;
    }
    
    .communication-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .communication-option {
        padding: 12px 15px;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 20px 15px;
    }
    
    .btn {
        width: 100%;
        padding: 15px 20px;
        font-size: 1rem;
        text-align: center;
        min-height: 48px;
    }
    
    .btn-secondary {
        order: 2;
    }
    
    .btn-primary {
        order: 1;
    }
    
    /* Admin Access Section */
    .admin-access {
        margin-top: 30px;
        padding: 20px;
    }
    
    .admin-access h4 {
        font-size: 1.1rem;
    }
    
    .admin-access p {
        font-size: 0.9rem;
    }
    
    .admin-access a {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .survey-selector {
        padding: 15px;
        margin: 5px auto;
        border-radius: 12px;
    }
    
    .header h1 {
        font-size: 1.6rem;
    }
    
    .header p {
        font-size: 0.9rem;
    }
    
    .survey-card {
        padding: 20px 15px;
    }
    
    .card-icon {
        font-size: 2rem;
    }
    
    .survey-card h3 {
        font-size: 1.2rem;
    }
    
    .survey-card p {
        font-size: 0.9rem;
    }
    
    .feature {
        font-size: 0.8rem;
    }
    
    .start-button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .survey-header h1 {
        font-size: 1.6rem;
    }
    
    .survey-subtitle {
        font-size: 0.9rem;
    }
    
    .section-header h2 {
        font-size: 1.2rem;
    }
    
    .section-quote {
        font-size: 0.8rem;
    }
    
    .question-card {
        padding: 15px 10px;
    }
    
    .question label {
        font-size: 0.95rem;
    }
    
    .rating-option {
        padding: 12px 10px;
    }
    
    .rating-text {
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .admin-access {
        padding: 15px;
    }
    
    .admin-access h4 {
        font-size: 1rem;
    }
    
    .admin-access p {
        font-size: 0.85rem;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 2px;
    }
    
    .survey-selector {
        padding: 10px;
        margin: 2px auto;
    }
    
    .header h1 {
        font-size: 1.4rem;
    }
    
    .survey-card {
        padding: 15px 10px;
    }
    
    .survey-header h1 {
        font-size: 1.4rem;
    }
    
    .section-header h2 {
        font-size: 1.1rem;
    }
    
    .question-card {
        padding: 10px 5px;
    }
    
    .rating-option {
        padding: 10px 8px;
    }
    
    .btn {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .survey-card {
        min-height: 200px;
    }
    
    .rating-option {
        min-height: 48px;
    }
    
    .btn {
        min-height: 48px;
    }
    
    .communication-option {
        min-height: 48px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success Animation */
.success-checkmark {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #4ade80;
    stroke-miterlimit: 10;
    margin: 0 auto 20px;
    box-shadow: inset 0px 0px 0px #4ade80;
    animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.success-checkmark circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #4ade80;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark path {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px #4ade80;
    }
}
