*,
*:before,
*:after {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    margin: 0px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.42857;
    touch-action: manipulation;
}

input,
button,
textarea,
select {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

h1 {
    margin-top: 10px;
}

h4 {
    margin-bottom: 10px;
}

h5 {
    margin-bottom: 5px;
    margin-top: 5px;
}

.btn {
    display: inline-block;
    line-height: 50px;
    padding: 0px 15px;
    border: 1px solid #a0a0a0;
    border-radius: 4px;
}

.btn.btn-danger {
    background-color: #d9534f;
    border-color: #d43f3a;
    color: #fff;
}

img {
    max-width: 100%;
}

.page {
    padding: 20px;
}

.has-menu {
    margin-bottom: 60px;
}

.menu {
    position: fixed;
    z-index: 999;
    left: 0px;
    bottom: 0px;
    width: 100%;
    height: 60px;
    color: #0179fe;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu .item+.item {
    border-left: 0px solid #909090;
}

.menu .item {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
}

.menu .item:active {
    background-color: #909090;
}

.toast-top-center {
    top: 10px;
}

.page-home {
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-home .item {
    display: block;
    align-items: center;
    justify-content: flex-start;
    color: #fff;
    background-color: #337ab7;
    border-radius: 32px;
    height: 160px;
    width: 160px;
    padding: 10px 10px 10px 10px;
    margin: 10px;
    text-align: center;
    display: inline-grid;
    justify-content: center;
    box-shadow: 0 0 16px gray;
}

.page-home .item2 {
    width: 165px;
    margin: 10px;
    padding-right: 20px;
    text-align: right;
}

.page-home .item-hint {
    background-color: #5750d9
}

.page-home .item-random {
    background-color: #ff9400
}

.page-home .item-full {
    background-color: #0fa05e
}

.page-home .item-wrong {
    background-color: #dc1354
}

.page-home .item-danger {
    background-color: #b80e0a
}

.page-home .item-exam {
    background-color: #af52dd
}

.page-home .item-law {
    background-color: #0171ec
}

.page-home .item-reset {
    background-color: #505150
}

.page-home .item-sign {
    background-color: #1189b0
}

.page-home .item:active {
    background-color: #286090;
    border-color: #204d74;
}

.page-home .fa-home-page {
    display: inline-block;
    font: normal normal normal 14px/1 FontAwesome;
    font-size: 55px;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.head-navigation {
    display: flex; 
    box-shadow: 0 5px 5px rgb(0 0 0 / 10%); 
    padding: 10px;
    min-height: 56px;
}
.head-navigation .left {
    width: 10%; 
    display: flex; 
    text-align: left;
    align-items: center;
    font-size: 24px;
    padding-left: 10px;
}
.head-navigation .center {
    width: 80%; 
    display: flex; 
    text-align: center; 
    align-items: center; 
    justify-content: center;
}
.head-navigation .right {
    width: 10%; 
    display: flex; 
    text-align: right; 
    justify-content: right; 
    align-items: center;
    font-size: 24px;
    padding-right: 10px;
}

#list-page #list {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: flex-start;
    justify-content: center;
}

#list-page #list a {
    display: inline-block;
    line-height: 50px;
    width: 50px;
    text-align: center;
    cursor: pointer;
    margin-top: 5px;
    margin-right: 5px;
    box-shadow: 0 0 2px gray;
    border-radius: 12px;
}

#list-page #list a:active {
    background-color: #d0d0d0;
}

#list-page #list a.correct {
    background-color: #449d44;
    border-color: #449d44;
    color: #fff;
}

#list-page #list a.danger {
    border-color: #ff9400;
}

#list-page #list a.correctdanger {
    background-color: #449d44;
    border-color: #ff9400;
    color: #fff;
}

#list-page #list a.correct:active {
    background-color: #1f471f;
    border-color: #1f471f;
}

#list-page #list a.wrong {
    background-color: #dc1354;
    border-color: #dc1354;
    color: #fff;
}

#list-page #list a.wrongdanger {
    background-color: #dc1354;
    border-color: #ff9400;
    color: #fff;
}

#list-page #list a.wrong:active {
    background-color: #922420;
    border-color: #922420;
}

#details-page {
    padding: 20px;
}

#details-page #q-details {
    font-size: 16px;
    padding-bottom: 65px;
}

#details-page .question-nav-item {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    color: black;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s;
}

#details-page .question-nav-item:hover {
    background-color: #e0e0e0;
    transform: scale(1.1);
}

#details-page .question-nav-item.answered {
    background-color: #0fa05e;
    border-color: #0fa05e;
    color: #fff;
}
#details-page .question-nav-item.correct {
    background-color: #0fa05e;
    border-color: #0fa05e;
    color: #fff;
}

#details-page .question-nav-item.wrong {
    background-color: #dc1354;
    border-color: #dc1354;
    color: #fff;
}

#details-page .question-nav-item.unanswered {
    background-color: #fff;
    border-color: #ddd;
    color: #000;
}

#details-page .answer {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 0px;
    border-bottom: 1px solid transparent;
    cursor: pointer;
}

#details-page .answer.correct {
    color: #fff;
    background-color: #0fa05e;
    border-radius: 8px;
    margin: 5px 0;
    padding: 10px;
    border: none;
}

#details-page .answer.wrong {
    color: #fff;
    background-color: #dc1354;
    border-radius: 8px;
    margin: 5px 0;
    padding: 10px;
    border: none;
}

#details-page .answer.correct + .answer {
    border-top: 1px solid transparent;
}

#details-page .answer:first-child {
    border-top: 1px solid transparent;
}

#details-page .answer .a-text {
    margin-left: 7px;
}

#details-page .nav {
    position: fixed;
    z-index: 999;
    left: 0px;
    bottom: 0px;
    width: 100%;
    height: 60px;
    background-color: #333;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#details-page .nav .item {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 30px;
}

#details-page .nav .item:active {
    background-color: #909090;
}

#details-page .nav .item+.item {
    border-left: 1px solid #909090;
}

#reset-page a {
    display: inline-block;
    line-height: 50px;
    width: 100px;
    border: 1px solid #a0a0a0;
    border-radius: 4px;
}

#list-wrong-page {
    padding: 0px;
}

#list-wrong-page #list {
    padding: 5px;
    font-size: 16px;
}

#list-wrong-page #list .item+.item {
    margin-top: 30px;
}

#list-wrong-page .answer {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 0px;
    border-bottom: 1px solid transparent;
}

#list-wrong-page .answer.correct {
    color: #0fa05e;
    font-weight: bold;
}

#list-wrong-page .answer.wrong {
    color: red;
}

#list-wrong-page .answer:first-child {
    border-top: 1px solid transparent;
}

#list-danger-page {
    
}

#list-danger-page #list {
    padding: 5px;
    font-size: 16px;
}

#list-danger-page #list .item+.item {
    margin-top: 30px;
}

#list-danger-page .answer {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 0px;
    border-bottom: 1px solid transparent;
}

#list-danger-page .answer.correct {
    color: #0fa05e;
    font-weight: bold;
}

#list-danger-page .answer.danger {
    color: red;
}

#list-danger-page .answer:first-child {
    border-top: 1px solid transparent;
}

#list-exam-page #list {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: center;
    gap: 20px;
    padding: 10px;
}

#list-exam-page #list a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 120px;
    text-align: left;
    cursor: pointer;
    padding: 10px;
    box-shadow: 0 0 5px rgba(0,0,0,0.15);
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
    background-color: white;
    border-radius: 12px;
}

/* Mobile: 2 columns */
@media (max-width: 767px) {
    #list-exam-page {
        padding-left: 20px;
        padding-right: 20px;
    }

    #list-exam-page #list {
        justify-content: flex-start;
        gap: 15px;
        padding-left: 10px;
        padding-right: 10px;
    }

    #list-exam-page #list a {
        width: calc((100% - 15px) / 2) !important;
        flex: 0 0 calc((100% - 15px) / 2);
        min-width: 0;
    }
}

#list-exam-page #list a:active {
    background-color: #d0d0d0;
}

#list-exam-page #list a[style*="background-color:#0fa05e"],
#list-exam-page #list a[style*="background-color:#0fa05e!important"] {
    background: #0fa05e !important;
    color: #fff;
}

#list-exam-page #list a[style*="background-color:#b80e0a"],
#list-exam-page #list a[style*="background-color:#b80e0a!important"] {
    background: #b80e0a !important;
    color: #fff;
}

#list-exam-page #list a.correct {
    background-color: #449d44;
    border-color: #449d44;
    color: #fff;
}

#list-exam-page #list a.danger {
    border-color: #ff9400;
}

#list-exam-page #list a.correctdanger {
    background-color: #449d44;
    border-color: #ff9400;
    color: #fff;
}

#list-exam-page #list a.correct:active {
    background-color: #1f471f;
    border-color: #1f471f;
}

#list-exam-page #list a.wrong {
    background-color: #dc1354;
    border-color: #dc1354;
    color: #fff;
}

#list-exam-page #list a.wrongdanger {
    background-color: #dc1354;
    border-color: #ff9400;
    color: #fff;
}

#list-exam-page #list a.wrong:active {
    background-color: #922420;
    border-color: #922420;
}

#list-exam-page #list a.exam-item {
    background-color: #fff;
    border: 1px solid #ddd;
}

#list-exam-page #list a.exam-passed {
    background-color: #0fa05e !important;
    color: #fff !important;
    border: none !important;
}

#list-exam-page #list a.exam-passed div,
#list-exam-page #list a.exam-passed span {
    color: #fff !important;
}

#list-exam-page #list a.exam-failed {
    background-color: #b80e0a !important;
    color: #fff !important;
    border: none !important;
}

#list-exam-page #list a.exam-failed div,
#list-exam-page #list a.exam-failed span {
    color: #fff !important;
}


/* Put your css in here */

#details-page .overlap {
    position: absolute;
    position: 0px 0px 0px 0px;
}

#details-page .ng-enter {
}

#details-page .ng-leave {
}

.new {
    align-items: center;
    justify-content: flex-start;
    color: #fff;
    border-radius: 4px;
    padding: 0 4px 0 4px;
    text-align: center;
    display: inline-grid;
    justify-content: center;
    background-color: darkorange;
    margin: auto;
}

@keyframes swipeRight {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

@keyframes swipeLeft {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0);
    }
}

@-webkit-keyframes swipeRight {
    0% {
        -webkit-transform: translateX(0);
    }
    100% {
        -webkit-transform: translateX(-100%);
    }
}

@-webkit-keyframes swipeLeft {
    0% {
        -webkit-transform: translateX(-100%);
    }
    100% {
        -webkit-transform: translateX(0);
    }
}

@-o-keyframes swipeRight {
    0% {
        -o-transform: translateX(0);
    }
    100% {
        -o-transform: translateX(-100%);
    }
}

@-o-keyframes swipeLeft {
    0% {
        -o-transform: translateX(-100%);
    }
    100% {
        -o-transform: translateX(0);
    }
}
#details-page .question-nav-item.current {
    background-color: #e6f3ff;
    border-color: #0171ec;
    color: #0171ec;
    box-shadow: 0 0 0 2px rgba(1, 113, 236, 0.18);
}

#details-page .question-nav-item.answered.current,
#details-page .question-nav-item.correct.current {
    background-color: #dff5ea;
    border-color: #0fa05e;
    color: #087a47;
    box-shadow: 0 0 0 2px rgba(15, 160, 94, 0.22);
}

#details-page .question-nav-item.wrong.current {
    background-color: #ffe5e9;
    border-color: #dc1354;
    color: #b80e0a;
    box-shadow: 0 0 0 2px rgba(220, 19, 84, 0.2);
}
#details-page .question-nav-list {
    width: 395px;
    margin-left: auto;
    margin-right: 0;
    display: grid;
    grid-template-columns: repeat(10, 35px);
    grid-auto-rows: 35px;
    justify-content: end;
    gap: 5px;
    padding: 5px;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    #details-page .question-nav-list {
        width: auto;
        max-width: 395px;
        margin-left: auto;
        margin-right: 0;
        grid-template-columns: repeat(10, 35px);
    }
}

@media (max-width: 390px) {
    #details-page .question-nav-list {
        width: 100%;
        grid-template-columns: repeat(auto-fill, 35px);
    }
}

/* ---- NEW UI REDESIGN ---- */
body {
    background-color: #f4f6fb;
    font-family: 'Inter', Helvetica, Arial, sans-serif;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ng-view {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background-color: #f4f6fb;
    min-height: 100vh;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f4f6fb;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1000;
    max-width: 480px;
    margin: 0 auto;
}

.top-header .header-btn {
    color: #0171ec;
    font-size: 15px;
    text-decoration: none;
    font-weight: 500;
}

.top-header .header-title {
    font-size: 16px;
    color: #333;
    text-transform: uppercase;
    font-weight: 700;
}

.page-home-new {
    padding: 0 15px 20px 15px;
    max-width: 480px;
    margin: 0 auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 10px;
    background: #fff;
    border-radius: 20px;
    padding: 20px 15px;
    margin-top: 5px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.icon-circle {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 8px;
    position: relative;
}

.icon-blue { background: #0171ec; color: #fff; }
.icon-green { background: #34c759; color: #fff; }
.icon-red { background: #ff3b30; color: #fff; }
.icon-yellow { background: #ffcc00; color: #fff; }
.icon-green-solid { background: #34c759; color: #fff; }
.icon-red-solid { background: #ff3b30; color: #fff; }
.icon-facebook { background: #3b5998; color: #fff; }

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: white;
    color: #ffcc00;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    border: 1px solid #eee;
}

.grid-label {
    font-size: 11px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
    text-transform: uppercase;
}

.grid-sub {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
    min-height: 12px;
}

.progress-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.progress-left {
    flex: 1;
    border-right: 1px dashed #ddd;
    padding-right: 15px;
    margin-right: 15px;
}

.progress-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.progress-bar-container {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: #e0e0e0;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
}

.progress-exams {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.progress-right {
    text-align: center;
    width: 70px;
}

.safety-title {
    font-size: 12px;
    color: #555;
    line-height: 1.3;
    margin-bottom: 5px;
}

.safety-value {
    font-size: 22px;
    font-weight: 700;
    color: #ff3b30;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-left: 5px;
}

.topic-card {
    background: #fff;
    border-radius: 20px;
    padding: 15px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    text-decoration: none;
    color: inherit;
}

.topic-icon {
    font-size: 26px;
    margin-right: 15px;
    width: 35px;
    text-align: center;
}

.topic-content {
    flex: 1;
}

.topic-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.topic-progress-bar {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    margin-bottom: 8px;
}

.topic-progress-fill {
    height: 100%;
    border-radius: 3px;
    background: #e0e0e0;
}

.topic-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.topic-stats .left {
    color: #888;
}

.topic-stats .right {
    color: #888;
}

.global-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid #eee;
    z-index: 1000;
}

.global-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #888;
    text-decoration: none;
    font-size: 10px;
}

.global-bottom-nav .nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
}

.global-bottom-nav .nav-item.active {
    color: #0171ec;
}