/* 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: #1a1a1a;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    padding: 20px;
}

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

.container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    overflow: hidden;
    animation: containerFloat 6s ease-in-out infinite;
    transform-style: preserve-3d;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: headerGradient 8s ease infinite;
    color: white;
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.15"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.15"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.15"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    animation: sparkle 20s linear infinite;
}

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

@keyframes sparkle {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-100px) translateY(-100px); }
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #fff, #f0f8ff, #fff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

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

.subtitle {
    font-size: 1.4rem;
    opacity: 0.95;
    margin-bottom: 30px;
    font-weight: 300;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out 0.5s both;
}

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

.privacy-notice {
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 16px;
    font-size: 1rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out 1s both;
    transition: all 0.3s ease;
}

.privacy-notice:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Form styles */
.feedback-form {
    padding: 50px 40px;
    position: relative;
}

.form-group {
    margin-bottom: 40px;
    opacity: 0;
    animation: slideInLeft 0.8s ease-out forwards;
    animation-delay: calc(var(--animation-order, 0) * 0.2s);
}

.form-group:nth-child(1) { --animation-order: 1; }
.form-group:nth-child(2) { --animation-order: 2; }
.form-group:nth-child(3) { --animation-order: 3; }
.form-group:nth-child(4) { --animation-order: 4; }
.form-group:nth-child(5) { --animation-order: 5; }

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

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 600;
    position: relative;
}

.form-group label::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.form-group:hover label::before {
    height: 100%;
    background: linear-gradient(45deg, #f093fb, #f5576c);
}

.required {
    color: #e74c3c;
    font-weight: bold;
}

.optional {
    color: #7f8c8d;
    font-weight: normal;
    font-size: 0.9rem;
}

.help-text {
    color: #7f8c8d;
    font-weight: normal;
    font-size: 0.9rem;
    font-style: italic;
}

/* Text inputs */
textarea {
    width: 100%;
    padding: 20px;
    border: 2px solid transparent;
    border-radius: 16px;
    font-size: 1.1rem;
    font-family: inherit;
    resize: vertical;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(45deg, #667eea, #764ba2, #f093fb) border-box;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

textarea:focus {
    outline: none;
    transform: translateY(-2px);
    box-shadow: 
        0 20px 40px rgba(102, 126, 234, 0.15),
        0 0 0 1px rgba(102, 126, 234, 0.2);
    background: linear-gradient(#fafbff, #fafbff) padding-box,
                linear-gradient(45deg, #667eea, #764ba2, #f093fb) border-box;
}

textarea:hover:not(:focus) {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.char-count {
    text-align: right;
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 5px;
}

/* Checkbox styles */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: normal !important;
    font-size: 1rem !important;
    position: relative;
    overflow: hidden;
}

.checkbox-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.checkbox-label:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.checkbox-label:hover::before {
    left: 100%;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-right: 16px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-color: #667eea;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-weight: bold;
    font-size: 16px;
    animation: checkmarkPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.1s forwards;
}

@keyframes checkmarkPop {
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Scale styles */
.scale-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(15px);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    font-size: 1rem;
    color: #5a6c7d;
    font-weight: 500;
}

.scale-options {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    position: relative;
}

.scale-options::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe);
    border-radius: 2px;
    z-index: 0;
    transform: translateY(-50%);
}

.scale-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex: 1;
    position: relative;
    z-index: 1;
}

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

.scale-number {
    width: 50px;
    height: 50px;
    border: 3px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    position: relative;
    overflow: hidden;
}

.scale-number::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.scale-option:hover .scale-number {
    transform: scale(1.15);
    border-color: #667eea;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.scale-option input[type="radio"]:checked + .scale-number {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white;
    transform: scale(1.2);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    animation: scaleSelected 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scaleSelected {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1.2); }
}

/* Submit button */
.form-actions {
    text-align: center;
    margin-top: 50px;
    animation: fadeInUp 1s ease-out 2s both;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    color: white;
    border: none;
    padding: 20px 50px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 250px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

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

.submit-btn:hover:not(:disabled) {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
    background-position: 100% 0;
    animation: buttonPulse 2s ease-in-out infinite;
}

.submit-btn:hover:not(:disabled)::before {
    left: 100%;
}

.submit-btn:active:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    animation: none;
}

@keyframes buttonPulse {
    0%, 100% { box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 25px 50px rgba(102, 126, 234, 0.6); }
}

/* Messages */
.message {
    margin-top: 30px;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    display: none;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: messageSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.message.success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.9), rgba(139, 195, 74, 0.9));
    color: white;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
}

.message.error {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.9), rgba(233, 30, 99, 0.9));
    color: white;
    box-shadow: 0 10px 30px rgba(244, 67, 54, 0.3);
}

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

/* Footer */
footer {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    padding: 40px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    border-radius: 2px;
}

.footer-text {
    color: #5a6c7d;
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 400;
    animation: fadeInUp 1s ease-out 2.5s both;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 16px;
        margin: 10px auto;
    }
    
    header {
        padding: 40px 25px;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .feedback-form {
        padding: 40px 25px;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .scale-options {
        gap: 8px;
    }
    
    .scale-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .submit-btn {
        padding: 18px 40px;
        font-size: 1.1rem;
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .scale-options::before {
        left: 5%;
        right: 5%;
    }
    
    .scale-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Loading state */
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

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