:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --light: #f8fafc;
    --dark: #1e293b;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 8px;
    overflow-y: auto;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.feedback-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2px;
    font-size: 1.75rem !important;
}

.header-section {
    margin-bottom: 10px !important;
}

.header-section p {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0;
}

/* Feedback Table Styles */
.feedback-table {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0;
}

.feedback-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.feedback-table thead th {
    font-weight: 600;
    padding: 8px 6px;
    border: none;
    font-size: 0.8rem;
    white-space: nowrap;
}

.feedback-table tbody tr {
    transition: background-color 0.2s ease;
}

.feedback-table tbody tr:hover {
    background-color: #f8fafc;
}

.feedback-table tbody td {
    padding: 4px 6px;
    vertical-align: middle;
    border-top: 1px solid #e2e8f0;
}

.department-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.8rem;
}

.feedback-table input[type="radio"] {
    display: none;
}

.rating-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.rating-label .emoji {
    font-size: 1.4rem;
    transition: transform 0.2s ease;
}

.rating-label:hover {
    transform: scale(1.08);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.rating-label:hover .emoji {
    transform: scale(1.15);
}

/* Selected States */
input[type="radio"]:checked+.rating-label.very-good {
    background: #d1fae5;
    border-color: var(--success);
    transform: scale(1.05);
}

input[type="radio"]:checked+.rating-label.good {
    background: #dbeafe;
    border-color: var(--info);
    transform: scale(1.05);
}

input[type="radio"]:checked+.rating-label.satisfactory {
    background: #fef3c7;
    border-color: var(--warning);
    transform: scale(1.05);
}

input[type="radio"]:checked+.rating-label.poor {
    background: #fee2e2;
    border-color: var(--danger);
    transform: scale(1.05);
}

.comment-input {
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px 7px;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 30px;
    max-height: 50px;
    width: 100%;
}

.comment-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

.btn-submit {
    background: var(--gradient-1);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
    font-size: 0.95rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
    background: var(--gradient-1);
}

.btn-submit:active {
    transform: translateY(0);
}

.success-modal .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.success-icon {
    animation: scaleIn 0.5s ease;
}

.error-icon {
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Mobile View Styles */
.mobile-view {
    display: none;
}

.mobile-dept-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.mobile-dept-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.mobile-dept-title {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 15px;
    font-size: 1rem;
    text-align: center;
}

.mobile-rating-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.mobile-radio {
    display: none;
}

.mobile-rating-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
    height: 60px;
    width: 100%;
    text-align: center;
}

.mobile-rating-btn .emoji {
    font-size: 1.8rem;
    transition: transform 0.3s ease;
    display: block;
}

.mobile-rating-btn .label {
    display: none;
}

.mobile-rating-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-rating-btn:hover .emoji {
    transform: scale(1.1);
}

/* Selected States for Mobile */
.mobile-radio:checked+.mobile-rating-btn.very-good {
    background: #d1fae5;
    border-color: var(--success);
}

.mobile-radio:checked+.mobile-rating-btn.very-good .label {
    color: var(--success);
    font-weight: 600;
}

.mobile-radio:checked+.mobile-rating-btn.good {
    background: #dbeafe;
    border-color: var(--info);
}

.mobile-radio:checked+.mobile-rating-btn.good .label {
    color: var(--info);
    font-weight: 600;
}

.mobile-radio:checked+.mobile-rating-btn.satisfactory {
    background: #fef3c7;
    border-color: var(--warning);
}

.mobile-radio:checked+.mobile-rating-btn.satisfactory .label {
    color: var(--warning);
    font-weight: 600;
}

.mobile-radio:checked+.mobile-rating-btn.poor {
    background: #fee2e2;
    border-color: var(--danger);
}

.mobile-radio:checked+.mobile-rating-btn.poor .label {
    color: var(--danger);
    font-weight: 600;
}

.mobile-comment-box {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    resize: vertical;
}

.mobile-comment-box:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

/* Responsive Design */
@media (max-width: 768px) {

    /* Hide desktop table, show mobile cards */
    .desktop-view {
        display: none !important;
    }

    .mobile-view {
        display: block;
    }

    .feedback-container {
        padding: 15px 10px;
    }

    .header-section h1 {
        font-size: 1.5rem;
    }

    .header-section p {
        font-size: 0.8rem;
    }
}

@media (min-width: 1400px) {
    body {
        padding: 15px;
    }

    .feedback-container {
        padding: 25px;
    }
}