/* Base Styles */
body {
    font-family: 'Inter', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at center, #1a1c2c 0%, #0e101a 100%);
    color: #ffffff;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    perspective: 1000px;
}

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

/* Typography */
h1 {
    text-align: center;
    color: #ffffff;
    font-size: 2rem;
    text-shadow: 0 0 10px rgba(0,102,102,0.3);
    margin-bottom: 30px;
}

h2 {
    color: #ffffff;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
    font-weight: 600;
    margin: 0;
}

h3 {
    color: #ffffff;
    margin-top: 10px;
}

p, strong, label {
    color: #ffffff;
}

/* Section Styling */
.section {
    margin-bottom: 20px;
    border-radius: 16px;
    background: linear-gradient(145deg, #1f2235, #252942);
    box-shadow: 0 8px 32px rgba(0,102,102,0.3);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,102,102,0.5);
}

.section-header {
    background: linear-gradient(145deg, #006666, #008080);
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.section-header:hover {
    background: linear-gradient(145deg, #008080, #006666);
}

.section-content {
    padding: 20px;
    transition: max-height 0.5s ease, padding 0.3s ease;
    max-height: 2000px;
    overflow: hidden;
}

.section-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.question {
    margin: 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Rating Buttons */
.rating-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

@media (max-width: 600px) {
    .rating-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}

.rating-btn {
    padding: 10px 15px;
    border-radius: 12px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    flex: 1;
    text-align: center;
    min-width: 60px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rating-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.rating-btn:hover::before {
    left: 100%;
}

.rating-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.rating-btn.selected {
    background: linear-gradient(145deg, #008080, #006666);
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,102,102,0.4);
}

/* Submit Button */
.submit-btn {
    text-align: center;
    margin: 30px 0;
}

button {
    background: linear-gradient(145deg, #008080, #006666);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 25px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,102,102,0.3);
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
    transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover {
    background: linear-gradient(145deg, #009999, #007777);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,102,102,0.6);
}

button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,102,102,0.4);
}

button[type="submit"] {
    min-width: 200px;
}

/* Form Fields */
textarea, input[type="text"], input[type="date"] {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: inherit;
}

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

textarea:focus, input[type="text"]:focus, input[type="date"]:focus {
    outline: none;
    border-color: #008080;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0,102,102,0.3);
}

textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Photo Upload Section */
.photo-upload-section {
    margin-top: 30px;
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(145deg, #1f2235, #252942);
    box-shadow: 0 8px 32px rgba(0,102,102,0.3);
}

.upload-container {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    padding: 20px;
    margin-top: 15px;
    text-align: center;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-container:hover {
    border-color: #008080;
    background: rgba(255, 255, 255, 0.05);
}

input[type="file"] {
    color: white;
}

#preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.image-preview {
    width: 120px;
    height: 120px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.image-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-img {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview:hover .remove-img {
    opacity: 1;
}

.upload-status {
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.7);
}

/* Recommendations Section */
.recommendation {
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    border-left: 3px solid #008080;
}

.recommendation p {
    margin-top: 0;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

/* Toggle Indicator */
.toggle-indicator {
    font-weight: bold;
    font-size: 20px;
    color: white;
    transition: transform 0.3s ease;
}

/* Error Messages */
.error-message {
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

/* Animation for section opening/closing */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-content:not(.collapsed) {
    animation: fadeIn 0.3s ease-out;
}

/* Background Effects */
.parallax-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.bg-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,128,128,0.1) 0%, transparent 70%);
    animation: pulse 15s infinite alternate ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.7; }
    100% { opacity: 0.3; }
}

/* Loading Indicator */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #008080;
    animation: spin 1s ease-in-out infinite;
}

.loading-text {
    color: white;
    margin-top: 15px;
    font-size: 16px;
}

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

/* Success/Error Messages */
.api-message {
    display: none;
    margin-top: 20px;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
}

.api-success {
    background: rgba(0, 128, 0, 0.2);
    color: #4BB543;
    border: 1px solid rgba(0, 128, 0, 0.3);
}

.api-error {
    background: rgba(255, 0, 0, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

/* Mobile-specific adjustments */
@media (max-width: 480px) {
    .container {
        padding: 10px;
        margin: 10px auto;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .section-header {
        padding: 12px;
    }
    
    .section-content {
        padding: 15px;
    }
    
    .question {
        margin: 15px 0;
    }
    
    .rating-btn {
        padding: 12px 10px;
        margin-bottom: 5px;
        min-height: 44px; /* Better touch target */
    }
    
    textarea {
        height: 80px;
    }
}
