/* CSS Variables for Blue & White Theme */
:root {
    --primary-blue: #0066FF;
    --primary-blue-dark: #0052CC;
    --primary-blue-light: #4D94FF;
    --secondary-blue: #E6F0FF;
    --accent-blue: #00B8D4;
    --text-dark: #1A1A1A;
    --text-gray: #666666;
    --text-light: #999999;
    --white: #FFFFFF;
    --background: #F8FAFB;
    --border-light: #E0E6ED;
    --success: #00C853;
    --error: #FF5252;
    --shadow-sm: 0 2px 4px rgba(0, 102, 255, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 102, 255, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 102, 255, 0.16);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Navigation - Clean Blue & White */
.navbar {
    background: var(--white);
    color: var(--text-dark);
    padding: 1.25rem 0;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
}

.navbar .logo:hover {
    color: var(--primary-blue-dark);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
    margin: 0;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-blue);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu .admin-link {
    color: var(--accent-blue);
    font-weight: 600;
}

.nav-menu .admin-link:hover {
    color: var(--primary-blue-dark);
}

/* Navigation Auth Section */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--secondary-blue);
    border-radius: 50px;
    color: var(--primary-blue-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.user-info svg {
    color: var(--primary-blue);
}

.btn-auth {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: var(--text-dark);
    border: 2px solid var(--border-light);
    background: var(--white);
}

.btn-auth:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.btn-auth.btn-register {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.btn-auth.btn-register:hover {
    background: var(--primary-blue-dark);
    border-color: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.btn-logout {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: var(--text-gray);
    border: 2px solid var(--border-light);
    background: var(--white);
}

.btn-logout:hover {
    border-color: var(--error);
    color: var(--error);
}

/* Mobile Timer in Navigation - Hidden on Desktop */
.mobile-timer {
    display: none;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.2rem;
    background: var(--background-secondary);
    border-radius: 10px;
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 1.3rem;
}

.mobile-timer svg {
    stroke: var(--primary-blue);
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

/* Hamburger Menu - Hidden on Desktop */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-blue);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section - Modern Blue Gradient */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: var(--white);
    padding: 1.5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}

.hero .subtitle {
    font-size: 1.35rem;
    opacity: 0.95;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* Main Content */
main {
    flex: 1;
    padding: 4rem 0;
    background: var(--background);
}

/* Features Section - Card Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: var(--white);
    padding: 3rem 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-card h2 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.75rem;
    font-weight: 600;
}

.feature-card p {
    margin-bottom: 2rem;
    color: var(--text-gray);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Feature Icon */
.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--white) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: var(--white);
    transform: scale(1.1) rotate(5deg);
}

/* Admin Section */
.admin-section {
    background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--white) 100%);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 2px solid var(--primary-blue-light);
}

.admin-section h2 {
    color: var(--primary-blue-dark);
    margin-bottom: 1rem;
    font-size: 1.85rem;
    font-weight: 600;
}

.admin-section p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Buttons - Modern Rounded Style */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.25);
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.35);
}

.btn-secondary {
    background: var(--accent-blue);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 184, 212, 0.25);
}

.btn-secondary:hover {
    background: #00A0BC;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 184, 212, 0.35);
}

/* Footer - Clean Blue & White */
footer {
    background: var(--white);
    color: var(--text-gray);
    padding: 2.5rem 0;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid var(--border-light);
}

footer p {
    font-size: 0.95rem;
}

/* Forms - Modern Clean Style */
.form-container {
    max-width: 480px;
    margin: 2rem auto;
    background: var(--white);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.form-container h1 {
    color: var(--primary-blue);
    margin-bottom: 2rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

/* Alerts - Clean Notification Style */
.alert {
    padding: 1.125rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    border: 2px solid #81C784;
}

.alert-success::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    border: 2px solid #EF5350;
}

.alert-error::before {
    content: '!';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #F44336;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
}

/* Placeholder Box */
.placeholder-box {
    background: var(--white);
    padding: 3rem;
    border-radius: 16px;
    border: 2px dashed var(--border-light);
    color: var(--text-gray);
    font-size: 1.1rem;
    margin: 2rem auto;
    max-width: 600px;
}

/* Survey Grid Layout */
.survey-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    padding: 3rem 0;
    align-items: start;
}

.survey-main {
    min-height: 400px;
}

.survey-admin {
    position: sticky;
    top: 100px;
}

/* Admin Tile */
.admin-tile {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.admin-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 102, 255, 0.25);
}

.admin-tile-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.admin-tile-icon svg {
    color: var(--white);
}

.admin-tile h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.admin-tile p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-size: 1rem;
}

.admin-tile .btn {
    background: var(--white);
    color: var(--primary-blue);
    border: none;
}

.admin-tile .btn:hover {
    background: var(--secondary-blue);
    color: var(--primary-blue-dark);
    transform: translateY(-2px);
}

/* Admin Action Bar */
.admin-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-light);
}

/* Surveys List */
.surveys-list {
    min-height: 400px;
}

/* Surveys Grid List */
.surveys-grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* Survey Card */
.survey-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    overflow: visible;
}

.survey-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.survey-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--background-gray);
}

.survey-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.survey-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.survey-card h3 {
    color: var(--primary-blue);
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.survey-description {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.survey-status {
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-active {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-draft {
    background: #FFF3E0;
    color: #EF6C00;
}

.status-closed {
    background: #FFEBEE;
    color: #C62828;
}

.status-opened {
    background: #E3F2FD;
    color: #1565C0;
}

.status-started {
    background: #F3E5F5;
    color: #6A1B9A;
}

/* Visibility and Voting Badges */
.visibility-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.5rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.visibility-badge svg {
    cursor: help;
}

.visibility-public {
    background: #E3F2FD;
    color: #1565C0;
}

.visibility-private {
    background: #FFF3E0;
    color: #EF6C00;
}

.visibility-voting {
    background: #E8F5E9;
    color: #2E7D32;
}

.survey-card-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1.5rem 1.5rem 1.5rem;
    gap: 1rem;
}

.survey-meta {
    color: var(--text-light);
    font-size: 0.85rem;
}

.survey-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: var(--white);
    color: var(--text-gray);
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

.btn-icon:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
    transform: scale(1.1);
}

.btn-icon.btn-icon-danger:hover {
    background: #F44336;
    border-color: #F44336;
    color: var(--white);
}

/* Tooltip for regular icon buttons */
.btn-icon[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 6px 10px;
    background: var(--text-dark);
    color: var(--white);
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 6px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
}

.btn-icon[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    border: 4px solid transparent;
    border-top-color: var(--text-dark);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
}

.btn-icon-sm {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: var(--white);
    color: var(--text-gray);
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
    position: relative;
}

.btn-icon-sm:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
    transform: scale(1.1);
}

.btn-icon-danger:hover {
    background: #F44336;
    border-color: #F44336;
    color: var(--white);
}

/* Tooltip */
.btn-icon-sm[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 6px 10px;
    background: var(--text-dark);
    color: var(--white);
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 6px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
}

.btn-icon-sm[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    border: 4px solid transparent;
    border-top-color: var(--text-dark);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
}

@keyframes tooltipFadeIn {
    to {
        opacity: 1;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: 20px;
    border: 2px dashed var(--border-light);
    max-width: 600px;
    margin: 0 auto;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: var(--secondary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
}

.empty-state h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: var(--text-gray);
    font-size: 1.05rem;
    margin-bottom: 0;
}

/* Survey Form Container */
.survey-form-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary-blue);
}

/* Steps Indicator */
.steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

a.step {
    text-decoration: none;
}

a.step:hover {
    text-decoration: none;
}

.step.clickable {
    cursor: pointer;
}

.step.clickable:hover {
    transform: translateY(-2px);
}

.step.clickable:hover .step-number {
    background: var(--primary-blue);
    color: var(--white);
    opacity: 0.8;
}

.step.completed .step-number {
    background: var(--success-green);
    color: var(--white);
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--border-light);
    color: var(--text-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--primary-blue);
    color: var(--white);
}

.step-label {
    font-size: 0.9rem;
    color: var(--text-gray);
    font-weight: 500;
}

.step.active .step-label {
    color: var(--primary-blue);
    font-weight: 600;
}

.step.preview .step-number {
    background: var(--primary-blue);
    color: var(--white);
}

.step.preview .step-label {
    color: var(--primary-blue);
    font-weight: 600;
}

.step-connector {
    width: 80px;
    height: 2px;
    background: var(--border-light);
    margin: 0 1rem;
}

/* Survey Form Card */
.survey-form-card {
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.survey-form-card h2 {
    color: var(--primary-blue);
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-light);
}

.btn-link {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: var(--primary-blue);
}

/* Questions List */
.questions-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Question Card */
.question-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.75rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.question-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.question-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.question-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.question-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.95rem;
}

.question-type-badge {
    padding: 0.375rem 0.875rem;
    background: var(--secondary-blue);
    color: var(--primary-blue);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.required-badge {
    padding: 0.375rem 0.875rem;
    background: #FFEBEE;
    color: #C62828;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.question-card-body {
    padding-left: 0;
}

.question-text {
    color: var(--text-dark);
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.question-options,
.question-categories {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--background-gray);
    border-radius: 12px;
    border-left: 4px solid var(--primary-blue);
}

.question-options strong,
.question-categories strong {
    display: block;
    color: var(--primary-blue);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.question-options ul,
.question-categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.question-options li,
.question-categories li {
    color: var(--text-dark);
    font-size: 0.95rem;
    padding-left: 1.5rem;
    position: relative;
}

.question-options li::before {
    content: '•';
    position: absolute;
    left: 0.5rem;
    color: var(--primary-blue);
    font-weight: bold;
}

.question-categories li::before {
    content: '■';
    position: absolute;
    left: 0.5rem;
    color: var(--accent-blue);
    font-size: 0.7rem;
}

.step.completed .step-number {
    background: #4CAF50;
    color: var(--white);
}

.step-connector.active {
    background: var(--primary-blue);
}

/* Preview Banner */
.preview-banner {
    background: linear-gradient(135deg, #FFA726 0%, #FF9800 100%);
    color: var(--white);
    padding: 1rem 0;
    text-align: center;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}

/* Survey View Styles */
.survey-question-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.survey-question-card:hover {
    box-shadow: var(--shadow-md);
}

.survey-question-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.survey-question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.survey-question-text {
    color: var(--text-dark);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.required-indicator {
    color: #F44336;
    margin-left: 0.25rem;
    cursor: help;
    position: relative;
}

.required-indicator[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 6px 10px;
    background: var(--text-dark);
    color: var(--white);
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 6px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
    font-weight: normal;
}

.required-indicator[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    border: 4px solid transparent;
    border-top-color: var(--text-dark);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
}

.survey-question-body {
    padding-left: 48px;
}

.survey-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--white);
    resize: vertical;
}

.survey-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.survey-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.survey-option-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--white);
}

.survey-option-label:hover {
    border-color: var(--primary-blue);
    background: var(--secondary-blue);
}

.survey-option-label input[type="radio"],
.survey-option-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.survey-option-label span {
    font-size: 1rem;
    color: var(--text-dark);
}

/* Rating Scale */
.survey-rating {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rating-scale {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.rating-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

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

.rating-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-gray);
    transition: all 0.3s ease;
    background: var(--white);
}

.rating-option:hover .rating-number {
    border-color: var(--primary-blue);
    background: var(--secondary-blue);
    color: var(--primary-blue);
}

.rating-option input[type="radio"]:checked + .rating-number {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: var(--white);
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-top: 0.5rem;
}

/* Survey Info Box */
.survey-info-box {
    background: var(--background-gray);
    border-left: 4px solid var(--primary-blue);
    border-radius: 10px;
    padding: 1.5rem;
}

/* Ordering Items */
.survey-ordering-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ordering-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--white);
    border: 2px solid var(--border-light);
    border-radius: 10px;
    cursor: move;
    transition: all 0.3s ease;
}

.ordering-item:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
}

.ordering-handle {
    color: var(--text-gray);
    font-size: 1.2rem;
    cursor: grab;
}

.ordering-item:active {
    opacity: 0.7;
    cursor: grabbing;
}

/* Categorizing Items */
.categorizing-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border: 2px solid var(--border-light);
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

.categorizing-label {
    font-weight: 500;
    color: var(--text-dark);
    flex: 1;
}

.survey-select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.survey-select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Show hamburger, hide default nav */
    .hamburger {
        display: flex;
    }

    .nav-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 2rem;
        z-index: 1000;
    }

    .nav-wrapper.active {
        right: 0;
    }

    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        width: 100%;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 0.75rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border-light);
    }

    .nav-menu a::after {
        display: none;
    }

    .nav-auth {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        width: 100%;
    }

    .language-switcher {
        margin-right: 0 !important;
    }

    .user-info {
        width: 100%;
        justify-content: flex-start;
    }

    .btn-auth, .btn-logout {
        width: 100%;
        text-align: center;
    }

    /* Prevent body scroll when menu is open */
    body.nav-open {
        overflow: hidden;
    }

    /* Hero mobile optimization */
    .hero {
        padding: 0.75rem 0;
    }

    .hero h1 {
        font-size: 1.5rem;
        margin-bottom: 0.15rem;
        line-height: 1.2;
    }

    .hero .subtitle {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .form-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .survey-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Collapsible filters on mobile */
    .survey-filters > div {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .survey-filters select {
        width: 100%;
    }

    .survey-filters label {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
    }

    .filter-toggle-btn {
        display: inline-block;
        padding: 0.75rem 1.5rem;
        background: var(--primary-blue);
        color: white;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        width: 100%;
        margin-bottom: 1rem;
    }

    .filter-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .filter-content.active {
        max-height: 500px;
    }

    .survey-admin {
        position: static;
    }

    .admin-action-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .admin-action-bar .btn {
        width: 100%;
    }

    .surveys-grid-list {
        grid-template-columns: 1fr;
    }

    /* Optimize survey/quiz tile footer layout on mobile */
    /* Reorganize quiz/survey tile layout for mobile */
    .survey-card-header {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .survey-card-header > div:first-child {
        order: 2; /* Title and description come second */
    }

    .survey-card-header > div:last-child {
        order: 1; /* Status and icons come first */
        align-self: flex-start !important;
    }

    .survey-card-header h3 {
        font-size: 1.1rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
    }

    .survey-card-header .survey-description {
        font-size: 0.9rem !important;
    }

    .survey-card-footer {
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .survey-meta {
        flex: 1;
        min-width: 0; /* Allow text to wrap properly */
    }

    .survey-actions {
        flex-shrink: 0;
    }

    /* Optimize quiz question header on mobile */
    .survey-form-card h2 {
        font-size: 1.25rem !important;
    }

    /* Make points display more compact on mobile */
    .survey-form-card > div[style*="display: flex"][style*="justify-content: space-between"][style*="flex-wrap: wrap"] > div[style*="display: inline-flex"] {
        padding: 0.4rem 0.75rem !important;
    }

    .survey-form-card > div[style*="display: flex"][style*="justify-content: space-between"][style*="flex-wrap: wrap"] > div[style*="display: inline-flex"] > div:first-child {
        font-size: 1.25rem !important;
    }

    /* Hide desktop timer on mobile during timed quizzes */
    #timerDisplay {
        display: none !important;
    }

    /* Reduce spacing between quiz/survey options on mobile */
    .survey-options {
        gap: 0.5rem !important;
    }

    .survey-option-label {
        padding: 0.75rem !important;
    }

    /* Optimize quiz results page for mobile */
    .survey-form-card[style*="text-align: center"] {
        padding: 1.5rem 1rem !important;
    }

    /* Compact performance message card on mobile */
    .survey-form-card[style*="border-left: 4px solid"] {
        padding: 1rem 1.5rem !important;
    }

    .survey-form-card[style*="border-left: 4px solid"] h2 {
        font-size: 1.1rem !important;
        margin-bottom: 0.35rem !important;
    }

    .survey-form-card[style*="border-left: 4px solid"] p {
        font-size: 0.95rem !important;
    }

    .survey-form-card[style*="text-align: center"] > div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.25rem !important;
        margin-bottom: 0.35rem !important;
    }

    .survey-form-card[style*="text-align: center"] > div[style*="display: flex"] > div[style*="font-size: 5rem"] {
        font-size: 2rem !important;
        line-height: 1 !important;
    }

    .survey-form-card[style*="text-align: center"] > div[style*="display: flex"] > div[style*="font-size: 2rem"] {
        font-size: 1.25rem !important;
    }

    .survey-form-card[style*="text-align: center"] > div[style*="padding: 1rem"] {
        padding: 0.75rem 1rem !important;
    }

    .survey-form-card[style*="text-align: center"] > div[style*="padding: 1rem"] > div {
        font-size: 0.95rem !important;
    }

    /* Optimize individual question results */
    .survey-form-card > div[style*="padding: 1.5rem"] {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }

    .survey-form-card > div[style*="padding: 1.5rem"] > div[style*="display: flex"][style*="align-items: center"] {
        margin-bottom: 0.75rem !important;
        gap: 0.5rem !important;
    }

    .survey-form-card > div[style*="padding: 1.5rem"] > div[style*="display: flex"] > div[style*="display: inline-flex"] > div[style*="width: 40px"] {
        width: 32px !important;
        height: 32px !important;
        font-size: 1rem !important;
    }

    .survey-form-card > div[style*="padding: 1.5rem"] > div[style*="font-size: 1.1rem"] {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
    }

    /* Wrap long text in results */
    .survey-form-card span,
    .survey-form-card div {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Explanation boxes on mobile */
    .survey-form-card > div > div[style*="background: #EFF6FF"] {
        margin-top: 0.75rem !important;
        padding: 0.75rem !important;
    }

    .survey-form-card > div > div[style*="background: #EFF6FF"] > div:first-child {
        font-size: 0.85rem !important;
    }

    .survey-form-card > div > div[style*="background: #EFF6FF"] > div:last-child {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    /* Reduce line spacing in survey results page */
    .survey-form-card h3 {
        margin-bottom: 0.25rem !important;
    }

    .survey-form-card > div[style*="display: flex"][style*="align-items: flex-start"] {
        margin-bottom: 1rem !important;
        gap: 0.75rem !important;
    }

    .survey-form-card .question-number {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem !important;
    }

    .survey-form-card > div[style*="background: var(--background-secondary)"] {
        padding: 1rem !important;
    }

    .survey-form-card > div[style*="background: var(--background-secondary)"] > div[style*="margin-bottom: 1rem"] {
        margin-bottom: 0.75rem !important;
    }

    .survey-form-card > div[style*="background: var(--background-secondary)"] > div > div[style*="margin-bottom: 0.5rem"] {
        margin-bottom: 0.25rem !important;
    }

    /* Response count on mobile */
    .survey-form-card > div[style*="text-align: center"][style*="font-size: 3rem"] {
        font-size: 2rem !important;
    }

    .survey-form-card > div[style*="text-align: center"] > div[style*="font-size: 1.2rem"] {
        font-size: 1rem !important;
        margin-top: 0.15rem !important;
    }
}
