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

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;

    /* Dark Theme (Default) */
    --bg-gradient-start: #060913;
    --bg-gradient-end: #111827;
    --bg-gradient-accent: #1e1b4b;
    --surface-color: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --surface-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --nav-bg: rgba(6, 9, 19, 0.8);

    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --success-color: #10b981;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-gradient-start);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

body {
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end), var(--bg-gradient-accent));
    background-size: 400% 400%;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    animation: gradientBG 15s ease infinite;
    overflow-x: hidden;
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 var(--primary-glow);
    }

    70% {
        box-shadow: 0 0 15px 10px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--surface-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Containers */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    animation: scaleIn 0.5s ease-out forwards;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 100vh;
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 3rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 100px;
    height: 100px;
    background: var(--primary-color);
    filter: blur(80px);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.5;
}

.login-box h1 {
    font-weight: 800;
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
    background: linear-gradient(to right, #818cf8, #c084fc, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: bgPan 4s linear infinite;
    background-size: 200% auto;
}

@keyframes bgPan {
    to {
        background-position: 200% center;
    }
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.2rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus {
    outline: none;
    background: rgba(30, 41, 59, 0.6);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.form-control:focus+label {
    color: var(--primary-color);
}

/* Print Styles - Professional Document Layout */
@media print {
    @page {
        margin: 1cm;
        size: A4;
    }

    body {
        background: white !important;
        color: #000 !important;
        font-family: "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
        font-size: 9pt;
        line-height: 1.3;
    }

    /* Hide UI elements */
    .navbar, .btn, .header-actions, .navbar-brand i, .navbar-menu, 
    .pagination-nav, .alert, .status-badge, .theme-toggle,
    .other-answers-container::-webkit-scrollbar {
        display: none !important;
    }

    .container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
    }

    .glass-panel {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin-bottom: 10px !important;
    }

    /* Official Branding Header */
    .print-header {
        display: block !important;
        text-align: left;
        border-bottom: 1.5px solid #000;
        margin-bottom: 15px;
        padding-bottom: 10px;
        position: relative;
    }

    .print-header img {
        max-height: 45px;
        float: right;
    }

    .print-header h1 {
        font-size: 14pt;
        margin: 0;
        color: #000;
    }

    .print-header p {
        font-size: 8pt;
        color: #444;
        margin: 2px 0 0 0;
    }

    /* Stats Cards - Convert to document sections */
    .stat-card {
        background: transparent !important;
        border: 1px solid #eee !important;
        border-radius: 0 !important;
        padding: 10px !important;
        margin-bottom: 10px !important;
        page-break-inside: avoid;
    }

    .stat-q-title {
        font-size: 10pt !important;
        font-weight: bold !important;
        color: #000 !important;
        margin-bottom: 5px !important;
        border-left: 3px solid #333 !important;
        padding-left: 8px !important;
    }

    .group-header {
        font-size: 11pt !important;
        background: #f8f9fa !important;
        padding: 6px !important;
        border: 1px solid #ddd !important;
        margin-top: 15px !important;
        page-break-after: avoid;
    }

    /* Bar charts for print - simplify */
    .bar-bg {
        background: #f0f0f0 !important;
        border: 1px solid #ccc !important;
        height: 8px !important;
    }
    
    .bar-fill {
        background: #333 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .bar-label {
        font-size: 9pt !important;
        color: #000 !important;
        margin-bottom: 2px !important;
    }

    .bar-container {
        margin-bottom: 6px !important;
    }

    /* Tables for print */
    .modern-table {
        border-collapse: collapse !important;
        width: 100% !important;
    }

    .modern-table th, .modern-table td {
        border: 1px solid #ddd !important;
        padding: 5px !important;
        text-align: left !important;
    }

    .modern-table th {
        background-color: #f2f2f2 !important;
        font-weight: bold !important;
    }

    /* Other answers */
    .other-answers-container {
        max-height: none !important;
        overflow: visible !important;
    }

    .other-answer-item {
        border-bottom: 1px solid #eee !important;
        padding: 3px 0 !important;
        break-inside: avoid;
    }

    /* Forces background colors and images in some browsers */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease-out;
}

.btn:active::after {
    transform: translate(-50%, -50%) scale(1);
    transition: 0s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #be123c);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.btn-block {
    width: 100%;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    animation: fadeInUp 0.4s ease forwards;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 4px solid var(--danger-color);
}

/* Header/Nav */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--surface-border);
}

.navbar-brand {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    transition: transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.navbar-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.navbar-menu a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Icons */
i {
    transition: transform 0.3s ease;
}

.btn:hover i {
    transform: scale(1.1);
}

/* Cards and Grid */
.survey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.survey-card {
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.survey-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-20deg);
    transition: 0.6s;
}

.survey-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.survey-card:hover::after {
    left: 200%;
}

.survey-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.survey-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    height: 3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.survey-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--surface-border);
}

.status-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: pulseGlow 2s infinite;
}

.status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Animations stagger */
.survey-grid>div:nth-child(1) {
    animation-delay: 0.1s;
}

.survey-grid>div:nth-child(2) {
    animation-delay: 0.2s;
}

.survey-grid>div:nth-child(3) {
    animation-delay: 0.3s;
}

.survey-grid>div:nth-child(4) {
    animation-delay: 0.4s;
}

.survey-grid>div:nth-child(5) {
    animation-delay: 0.5s;
}