:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --bg-start: #E0E7FF;
    --bg-end: #C7D2FE;
    --surface: rgba(255, 255, 255, 0.85);
    --surface-blur: 16px;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border: rgba(255, 255, 255, 0.4);

    --rating-bad: #EF4444;
    --rating-bad-light: #FEE2E2;
    --rating-happy: #F59E0B;
    --rating-happy-light: #FEF3C7;
    --rating-very-happy: #10B981;
    --rating-very-happy-light: #D1FAE5;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Noto Sans Sinhala', 'Noto Sans Tamil', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
    padding: 2rem;
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Shapes */
.background-shape {
    position: absolute;
    filter: blur(60px);
    z-index: 0;
    border-radius: 50%;
    animation: float 20s infinite alternate linear;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.4);
    top: -10%;
    left: -10%;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: rgba(236, 72, 153, 0.4);
    bottom: -5%;
    right: -5%;
    animation-delay: -5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: rgba(16, 185, 129, 0.3);
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

/* Container */
.container {
    background: var(--surface);
    backdrop-filter: blur(var(--surface-blur));
    -webkit-backdrop-filter: blur(var(--surface-blur));
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    z-index: 1;
    position: relative;
}

/* Header & Lang Switcher */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.lang-switcher {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 9999px;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

/* Rating options */
.rating-section {
    margin-bottom: 2.5rem;
}

.rating-options {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.rating-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid transparent;
    transition: var(--transition);
}

.rating-option:hover {
    transform: translateY(-4px);
    background: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.rating-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.emoji-container {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
    background: #F1F5F9;
}

.rating-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-muted);
    transition: var(--transition);
}

/* Checked states */
.rating-option input:checked~.emoji-container {
    transform: scale(1.1);
}

[for="rating-bad"] input:checked~.emoji-container {
    background: var(--rating-bad-light);
}

[for="rating-bad"]:has(input:checked) {
    border-color: var(--rating-bad);
    background: white;
}

[for="rating-bad"] input:checked~.rating-label {
    color: var(--rating-bad);
}

[for="rating-happy"] input:checked~.emoji-container {
    background: var(--rating-happy-light);
}

[for="rating-happy"]:has(input:checked) {
    border-color: var(--rating-happy);
    background: white;
}

[for="rating-happy"] input:checked~.rating-label {
    color: var(--rating-happy);
}

[for="rating-very-happy"] input:checked~.emoji-container {
    background: var(--rating-very-happy-light);
}

[for="rating-very-happy"]:has(input:checked) {
    border-color: var(--rating-very-happy);
    background: white;
}

[for="rating-very-happy"] input:checked~.rating-label {
    color: var(--rating-very-happy);
}


/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

input,
textarea,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

input::placeholder,
textarea::placeholder {
    color: #94A3B8;
}

/* Buttons */
.submit-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

.submit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}

/* Success Message */
.hidden {
    display: none !important;
}

.success-message {
    text-align: center;
    padding: 2rem 0;
    animation: fadeIn 0.5s ease-out forwards;
}

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

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

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.success-message h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.new-review-btn {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.new-review-btn:hover {
    background: var(--primary);
    color: white;
}

/* Custom Elements */
.dept-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1.5rem;
    }

    .rating-options {
        flex-direction: column;
    }

    .rating-option {
        flex-direction: row;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
    }

    .emoji-container {
        width: 48px;
        height: 48px;
        font-size: 1.75rem;
        margin-bottom: 0;
        margin-right: 1rem;
    }

    .rating-label {
        font-size: 1rem;
        text-align: left;
    }
}