:root {
    --offwhite: #f8f2e8;
    --str-gree: #336361;
    --gold-sand: #eed16c;
}

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

a {
    all: unset;
}

ul li {
    list-style: none;
}

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 15px;
}

::-webkit-scrollbar-track {
    background-color: #000000;
}

::-webkit-scrollbar-thumb {
    background-color: var(--str-gree);
    border-radius: 5px;
}

::selection {
    color: var(--str-gree);
    background-color: var(--gold-sand);
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    background-image: url(../assets/7.jpeg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    background-color: #000000;
    height: 50px;
    align-items: center;
}

.navbar a {
    color: var(--offwhite);
    align-self: center;
    transition: 0.3s ease-in-out;
    cursor: pointer;
    padding: 5px;
}

.navbar a:hover {
    background-color: var(--str-gree);
    border-radius: 5px;
}

@keyframes slideIn {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    animation: slideIn 0.8s ease-out forwards;
    flex: 1;
}

.title {
    font-size: 30px;
    font-weight: bold;
    padding: 15px 0;
    margin-bottom: 20px;
    color: var(--offwhite);
}

.tabs-wrapper {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.tabs-wrapper input[type="radio"] {
    display: none;
}

.tab {
    display: none;
}

#tab1:checked~.content .tab1,
#tab2:checked~.content .tab2,
#tab3:checked~.content .tab3,
#tab4:checked~.content .tab4,
#tab5:checked~.content .tab5,
#tab6:checked~.content .tab6,
#tab7:checked~.content .tab7,
#tab8:checked~.content .tab8 {
    display: block;
}

.sidebar {
    width: 25%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(24, 28, 33, 0.03);
}

.sidebar-link {
    padding: 15px 20px;
    text-decoration: none;
    color: var(--str-gree);
    border-bottom: 1px solid rgba(24, 28, 33, 0.03);
    cursor: pointer;
    transition: background 0.1s;
}

.sidebar-link:hover {
    background: #f1f1f1;
}

#tab1:checked~.sidebar label[for="tab1"],
#tab2:checked~.sidebar label[for="tab2"],
#tab3:checked~.sidebar label[for="tab3"],
#tab4:checked~.sidebar label[for="tab4"],
#tab5:checked~.sidebar label[for="tab5"],
#tab6:checked~.sidebar label[for="tab6"],
#tab7:checked~.sidebar label[for="tab7"],
#tab8:checked~.sidebar label[for="tab8"] {
    background: var(--gold-sand);
    font-weight: bold;
    color: var(--str-gree);
}

.content {
    width: 75%;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.tab-content {
    width: 100%;
}

.card {
    background: #fff;
    box-shadow: 0 1px 4px rgba(24, 28, 33, 0.012);
    border-radius: 20px;
    overflow: hidden;
}

.profile-section {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.profile-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.profile-actions {
    margin-left: 20px;
}

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
    border: none;
    z-index: 2;
    pointer-events: auto;
}

.btn-outline-primary {
    border: 1px solid var(--str-gree);
    background: transparent;
    color: var(--str-gree);
}

.btn-outline-primary:hover {
    background: var(--str-gree);
    color: #fff;
}

.btn-default {
    border: 1px solid rgba(24, 28, 33, 0.1);
    background: transparent;
    color: #000000;
    background-color: var(--offwhite);
    transition: 0.3s ease-in-out;
}

.btn-default:hover {
    background-color: var(--str-gree);
    color: var(--offwhite);
}

.btn-primary {
    background: var(--str-gree);
    color: #fff;
    border: none;
    transition: all 0.3s ease-in-out;
    opacity: 1;
}

.btn-primary:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.btn-danger {
    background-color: #dc3545;
    color: #fff;
    border: none;
    transition: all 0.3s ease-in-out;
    opacity: 1;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: scale(1.05);
    opacity: 0.9;
}

.text-light {
    color: var(--str-gree);
    font-size: 12px;
    margin-top: 5px;
}

.file-input {
    position: absolute;
    visibility: hidden;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.divider {
    border: none;
    border-top: 1px solid rgba(24, 28, 33, 0.1);
    margin: 0;
}

.form-section {
    padding: 20px 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold-sand);
    box-shadow: 0 0 5px rgba(0, 0, 255, 0.3);
}

textarea.form-control {
    resize: vertical;
}

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

.switcher {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.switcher-input {
    display: none;
}

.switcher-indicator {
    width: 40px;
    height: 20px;
    background: #ddd;
    border-radius: 10px;
    position: relative;
    margin-right: 10px;
    cursor: pointer;
}

.switcher-indicator::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--offwhite);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s;
}

.switcher-input:checked+.switcher-indicator {
    background: var(--str-gree);
}

.switcher-input:checked+.switcher-indicator::before {
    left: 22px;
}

.switcher-label {
    font-size: 14px;
}

.action-buttons {
    display: flex !important;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    z-index: 10 !important;
}

.tab1 .action-buttons,
.tab2 .action-buttons,
.tab3 .action-buttons,
.tab4 .action-buttons,
.tab6 .action-buttons,
.tab7 .action-buttons,
.tab8 .action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.tab1 .save-general-btn,
.tab2 .save-password-btn,
.tab3 .save-info-btn,
.tab4 .save-social-btn,
.tab6 .add-book-btn,
.tab7 .delete-book-btn,
.tab8 .logout-btn,
.tab8 .delete-account-btn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: all !important;
    z-index: 10 !important;
    min-width: 100px;
    min-height: 40px;
    background-color: var(--str-gree);
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
}
.tab3, .tab4, .tab6, .tab7, .tab8 {
    position: relative;
    z-index: 5;
}
.tab8 .delete-account-btn {
    background-color: #dc3545;
}

.footer {
    background-color: var(--offwhite);
    color: var(--str-gree);
    text-align: center;
    padding: 10px 0;
    width: 100%;
}

.footer a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.footer a p {
    margin: 0;
    font-size: 14px;
}

/* Media Queries */
@media screen and (max-width: 800px) {
    .form-group {
        margin-bottom: 15px;
    }

    .form-label {
        font-size: 14px;
    }

    .form-control {
        font-size: 13px;
        padding: 6px;
    }

    .section-title {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .action-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .action-buttons .btn {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 120px;
    }

    textarea.form-control {
        min-height: 80px;
    }
}

@media screen and (max-width: 768px) {
    .tabs-wrapper {
        flex-direction: column;
    }

    .sidebar,
    .content {
        width: 100%;
    }

    .sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(24, 28, 33, 0.03);
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .sidebar-link {
        padding: 10px 15px;
        border-bottom: none;
        border-right: 1px solid rgba(24, 28, 33, 0.03);
    }

    .content {
        padding: 15px;
    }

    .profile-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-actions {
        margin-left: 0;
        margin-top: 15px;
    }

    .action-buttons {
        justify-content: center;
    }

    .action-buttons .btn {
        min-width: 100px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .title {
        font-size: 20px;
    }

    .sidebar-link {
        padding: 8px 10px;
        font-size: 14px;
    }

    .form-control {
        font-size: 13px;
    }

    .btn {
        font-size: 13px;
        padding: 6px 12px;
    }

    .action-buttons .btn {
        font-size: 12px;
        padding: 6px 12px;
        min-width: 80px;
    }

    .section-title {
        font-size: 14px;
    }

    .footer a p {
        font-size: 12px;
    }
}