:root {
    --aws-blue: #232f3e;
    --aws-orange: #ff9900;
}

body {
    background: linear-gradient(135deg, #f5f7fb 0%, #e8ecf4 100%);
    font-family: 'Segoe UI', sans-serif;
    min-height: 100vh;
}

.sidebar {
    height: 100vh;
    width: 280px;
    position: fixed;
    top: 0;
    left: -280px;
    z-index: 1050;
    background-color: var(--aws-blue);
    transition: all 0.3s ease;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #1a2333;
}

.sidebar-menu {
    padding: 1rem 0;
    height: calc(100vh - 85px);
    overflow-y: auto;
}

.sidebar-item {
    padding: 0.85rem 1.5rem;
    color: #d1d5db;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.sidebar-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.sidebar-item.active {
    background-color: rgba(255, 153, 0, 0.15);
    color: var(--aws-orange);
    border-left-color: var(--aws-orange);
    font-weight: 600;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.sidebar-overlay.active {
    display: block;
}

.main-content {
    transition: all 0.3s ease;
    padding-top: 1rem;
}

.quiz-container {
    max-width: 980px;
    margin: 1rem auto 2rem auto;
}

.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header-aws {
    background: linear-gradient(90deg, var(--aws-blue), #1a2333);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 16px 16px 0 0;
}

@media (max-width: 768px) {
    .header-aws {
        padding: 0.6rem 1rem !important;
    }

    .header-aws .fab.fa-aws {
        font-size: 1.5rem !important;
    }

    .header-aws h1.h4 {
        font-size: 0.95rem;
        margin-bottom: 0 !important;
    }

    .header-aws p.small {
        display: none;
    }

    .header-aws .btn-sm {
        padding: 0.3rem 0.7rem;
        font-size: 0.75rem;
    }

    .header-aws .btn-sm .fa-sync-alt,
    .header-aws .btn-sm .fa-flag-checkered {
        margin-right: 0 !important;
    }

    .header-aws .btn-sm .btn-label {
        display: none;
    }

    .mode-label span {
        display: none;
    }
}

.carousel-item {
    padding: 2rem 2rem 6rem 2rem;
    min-height: 680px;
    overflow-y: auto;
}

.question-text {
    font-size: 1.15rem;
    line-height: 1.5;
    font-weight: 500;
    color: #1f2937;
}

.option {
    transition: all 0.25s ease;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.1rem 1.4rem;
    margin-bottom: 0.85rem;
    cursor: pointer;
    background-color: #fff;
}

.option:hover {
    border-color: var(--aws-orange);
    background-color: #fffaf0;
    transform: translateY(-1px);
}

.option.selected-correct {
    border-color: #10b981 !important;
    background-color: #f0fdf4 !important;
}

.option.selected-wrong {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.option.option-selected-prova {
    border-color: #0d6efd !important;
    background-color: #e8f0fe !important;
}

.option.disabled {
    pointer-events: none;
}

.feedback-box {
    margin-top: 2rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.feedback-header {
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 1.05rem;
}

.feedback-body {
    padding: 1.5rem;
    background-color: #fff;
}

.explanation-item {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px dashed #e5e7eb;
}

.explanation-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.progress-bar {
    background: linear-gradient(90deg, var(--aws-orange), #ffbb33);
}

.nav-btn {
    border-radius: 50px;
    padding: 0.65rem 1.75rem;
    font-weight: 600;
    min-width: 130px;
}

.mode-toggle {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 4px 6px;
    cursor: pointer;
    position: relative;
    gap: 2px;
    user-select: none;
    transition: background 0.2s;
}

.mode-toggle:hover {
    background: rgba(255, 255, 255, 0.22);
}

.mode-label {
    position: relative;
    z-index: 1;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    padding: 4px 12px;
    border-radius: 50px;
    transition: color 0.25s;
    white-space: nowrap;
}

.mode-label-inactive {
    color: rgba(255, 255, 255, 0.45);
}

.mode-slider {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 6px;
    width: calc(50% - 6px);
    background: var(--aws-orange);
    border-radius: 50px;
    transition: transform 0.25s ease;
    z-index: 0;
}

.mode-prova .mode-slider {
    background: #6f42c1;
}

@media (max-width: 576px) {
    .mode-label i { margin: 0 !important; }
    .mode-label span { display: none; }
}

.aws-badge {
    background-color: var(--aws-orange);
    color: white;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.float-btn {
    position: fixed;
    bottom: 1.5rem;
    z-index: 1030;
    border-radius: 50px !important;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    transition: all 0.2s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.float-prev {
    left: 2rem;
    bottom: 4rem;
}

.float-next {
    right: 2rem;
    bottom: 4rem;
}

.float-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

@media (max-width: 576px) {
    .float-btn {
        bottom: 1rem;
        padding: 0.5rem 1rem;
    }

    .float-prev {
        left: 1.5rem;
        bottom: 2rem;
    }

    .float-next {
        right: 1.5rem;
        bottom: 2rem;
    }

    .float-btn .btn-text {
        display: none;
    }
}