/* Modern Feedback Page Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary-color: #182D5C; /* KAI Deep Blue */
    --accent-orange: #E85C24; /* KAI Accent Orange */
    --accent-blue: #00A2E8; /* KAI Bandara Blue */
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --bg-card: rgba(255, 255, 255, 0.95);
    --shadow-premium: 0 30px 60px -15px rgba(15, 23, 42, 0.3);
    --border-glass: rgba(255, 255, 255, 0.5);
    --font-family: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    color: var(--text-dark);
}

/* Background overlay for blur and depth */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.7) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1;
}

/* Card Container */
.container {
    width: 100%;
    max-width: 680px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 32px;
    box-shadow: var(--shadow-premium);
    padding: 40px;
    z-index: 2;
    position: relative;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(0);
}

.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 40px 80px -20px rgba(15, 23, 42, 0.4);
}

/* Header Area (Logos) */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 1.5px solid rgba(226, 232, 240, 0.8);
}

.logo-container {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-kai {
    height: 100%;
    object-fit: contain;
}

.logo-wsc {
    height: 48px;
    object-fit: contain;
}

.logo-divider {
    width: 1.5px;
    height: 35px;
    background-color: rgba(226, 232, 240, 0.9);
    margin: 0 20px;
}

/* Content Area */
.feedback-content {
    text-align: center;
}

h1.title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--primary-color);
    margin-bottom: 35px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

h1.title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--accent-orange);
    border-radius: 2px;
}

/* Emojis Layout */
.emojis-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 520px;
    margin: 0 auto 35px auto;
    padding: 10px 0;
}

.emoji-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 56px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    outline: none;
    user-select: none;
}

.emoji-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(24, 45, 92, 0.04);
    transform: scale(0);
    transition: transform 0.3s ease;
    z-index: -1;
}

.emoji-btn:hover {
    transform: scale(1.22) translateY(-8px);
}

.emoji-btn:hover::after {
    transform: scale(1.1);
}

.emoji-btn:active {
    transform: scale(0.95);
}

/* Selected State */
.emoji-btn.selected {
    transform: scale(1.3) translateY(-10px);
}

.emoji-btn.selected::after {
    background: radial-gradient(circle, rgba(232, 92, 36, 0.1) 0%, rgba(24, 45, 92, 0.05) 100%);
    transform: scale(1.2);
    border: 2px solid var(--accent-orange);
}

/* Tooltip */
.emoji-label {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 12px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.emoji-btn:hover .emoji-label,
.emoji-btn.selected .emoji-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.emoji-btn.selected .emoji-label {
    background: var(--accent-orange);
    color: white;
}

/* Comment Form Animation */
.comment-section {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    margin-top: 10px;
}

.comment-section.active {
    max-height: 300px;
    opacity: 1;
    padding-top: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.comment-textarea {
    width: 100%;
    height: 110px;
    padding: 15px;
    border: 1.5px solid #cbd5e1;
    border-radius: 16px;
    font-family: var(--font-family);
    font-size: 15px;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.comment-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(24, 45, 92, 0.1);
    background: #ffffff;
}

/* Buttons */
.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #25407d 100%);
    color: white;
    border: none;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(24, 45, 92, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #25407d 0%, var(--primary-color) 100%);
    box-shadow: 0 6px 20px rgba(24, 45, 92, 0.3);
    transform: translateY(-2px);
}

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

.submit-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Success Screen */
.success-screen {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 10px;
    text-align: center;
}

.success-screen.active {
    display: flex;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.success-icon {
    width: 90px;
    height: 90px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    color: #15803d;
    font-size: 44px;
    box-shadow: 0 10px 20px rgba(21, 128, 61, 0.15);
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) delay-100ms;
}

.success-title {
    font-size: 28px;
    font-weight: 800;
    color: #166534;
    margin-bottom: 12px;
}

.success-message {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 380px;
    line-height: 1.6;
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.6);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Audit */
@media (max-width: 600px) {
    .container {
        padding: 30px 20px;
        border-radius: 24px;
    }
    
    .header {
        margin-bottom: 30px;
        padding-bottom: 20px;
    }

    .logo-container {
        height: 40px;
    }
    
    .logo-divider {
        margin: 0 10px;
        height: 25px;
    }

    h1.title {
        font-size: 24px;
        margin-bottom: 25px;
    }

    .emojis-grid {
        gap: 8px;
    }

    .emoji-btn {
        font-size: 40px;
        width: 56px;
        height: 56px;
    }

    .emoji-label {
        font-size: 9px;
        bottom: -22px;
    }

    .success-icon {
        width: 80px;
        height: 80px;
        font-size: 38px;
    }

    .success-title {
        font-size: 24px;
    }
}

/* Spinner for Loading State */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: none;
}

.submit-btn.loading .spinner {
    display: block;
}

.submit-btn.loading .btn-text {
    display: none;
}

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