/* ---------- Import fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;700&display=swap');

/* ---------- Root Variables ---------- */
:root {
    --base-font: 'Comfortaa', sans-serif;
    --base-font-size: 16px;
    --text-color: black;
}

/* ---------- General Styles ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--base-font);
    font-size: var(--base-font-size);
    line-height: 1.7;
    overflow-x: hidden;
    background: #F2F2F2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-color);
    transition: background-image 0.35s ease-in-out;
}

body::-webkit-scrollbar {
    width: 20px;
}

body::-webkit-scrollbar-track {
    background: #E6E6E6;
}

body::-webkit-scrollbar-thumb {
    background: #A8A8A8;
}

p {
    margin-bottom: 10px;
}

a {
    color: #000;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

time {
	color: #777;
}

textarea,
select,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    margin: 0;
    display: block;
    resize: none;
    outline: none;
    font-family: var(--base-font);
    font-size: var(--base-font-size);
    background: transparent;
    color: #7E858B;
    border: 1px solid #A7ADAF;
    border-radius: 5px;
    cursor: pointer;
    box-sizing: border-box;
}

textarea:focus,
input:focus,
select:focus {
    border-color: #000;
}

button,
a.button {
    line-height: 1.6;
    padding: 3px 15px;
    display: inline-block;
    text-decoration: none;
    font-family: var(--base-font);
    font-size: var(--base-font-size);
    background: linear-gradient(to bottom, #f2f2f2 0%, #ebebeb 42%, #dddddd 47%, #cfcfcf 100%);
    color: #000;
    border: 1px solid #707070;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.1s ease-in;
}

button:hover,
a.button:hover,
button:focus {
    background: linear-gradient(to bottom, #eaf6fd 0%, #d9f0fc 42%, #bee6fd 47%, #bce5fc 58%, #a7d9f5 100%);
    border: 1px solid #3C7FB1;
    box-shadow: 0 0 3px #A7D9F5;
}

button:active {
    box-shadow: inset 0 -1px 6px rgba(0, 0, 0, 0.2), inset 0 -0.7em #BEE6FD, 0 0 3px #A7D9F5;
}

button.active {
    background: linear-gradient(to bottom, #eaf6fd 0%, #d9f0fc 42%, #bee6fd 47%, #bce5fc 58%, #a7d9f5 100%);
    border: 1px solid #3C7FB1;
    box-shadow: 0 0 3px #A7D9F5;
}

/* ---------- Lists ---------- */
#activities li {
    margin: 0 20px 10px 20px;
    list-style: none;
}

.list {
    overflow: hidden;
}

.list .error {
    display: none;
}

.list-title {
    width: 200px;
    margin-bottom: 20px;
    float: left;
    clear: both;
}

.list-title code {
    font-size: calc(var(--base-font-size) + 10px);
}

.list-icon {
    width: 150px;
    height: 150px;
    margin-bottom: -50px;
    position: relative;
    background: gold;
    color: black;
    clip-path: polygon(50% 0%,61% 18%,82% 18%,68% 32%,79% 50%,61% 50%,50% 68%,39% 50%,21% 50%,32% 32%,18% 18%,39% 18%);
}

.list-icon code {
    position: absolute;
    top: 40px;
    left: 50px;
}

.list-content {
    width: calc(100% - 200px);
    padding: 0;
    margin-bottom: 20px;
    float: right;
    color: var(--text-color);
}

.list-content h3 {
    margin: 20px 0 0 0;
}

.list-content p {
    text-align: left;
}

.list-content .double input:nth-child(1) {
    width: calc(50% - 5px);
    float: left;
}

.list-content .double input:nth-child(2) {
    width: calc(50% - 5px);
    float: right;
}

/* ---------- Switch ---------- */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 40px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #CC0000;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.4s;
}

.slider:before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    left: 5px;
    bottom: 5px;
    background-color: #fff;
    border-radius: 50%;
    transition: 0.4s;
}

.switch input:checked + .slider {
    background-color: #66bb6a;
}

.switch input:checked + .slider:before {
    transform: translateX(20px);
}

/* ---------- Emoji Picker ---------- */
.emoji {
    position: relative;
}

.emoji-trigger {
    display: inline-block;
    cursor: pointer;
}

.emoji-picker {
    width: 300px;
    margin-bottom: 20px;
    display: none;
    z-index: 100;
}

.emoji-picker input {
    width: 100%;
    margin-bottom: 10px;
    padding: 5px;
}

.emoji-categories {
    margin-bottom: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.emoji-categories button {
    padding: 5px;
    flex: 1;
    font-size: 14px;
    cursor: pointer;
}

.emoji-grid {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(6, 1fr);
}

.emoji-grid span {
    font-size: 24px;
    cursor: pointer;
    text-align: center;
    line-height: 1.5;
    transition: transform 0.1s;
}

.emoji-grid span:hover {
    transform: scale(1.3);
}

/* ---------- Notifications ---------- */
.notification {
    position: relative;
    border: 2px solid #00acc1;
    padding: 20px;
    margin-bottom: 20px;
    color: #007c91;
    border-radius: 5px;
    background-color: #e0f7fa;
}

.notification.success {
    border-color: #43a047;
    color: #2e7d32;
    background-color: #e8f5e9;
}

.notification.error {
    border-color: #e53935;
    color: #b71c1c;
    background-color: #ffebee;
}

.notification.loading {
    padding-left: 50px;
}

.notification.loading::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 3px solid #007c91;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.notification .close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
    font-weight: bold;
    background: none;
    border: none;
    color: inherit;
    font-size: 16px;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* ---------- Modal ---------- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
}

.modal-content {
    background: #fff;
    width: 400px;
    padding: 20px;
    margin: 10% auto;
    border-radius: 6px;
}

.close {
    float: right;
    cursor: pointer;
    font-size: 20px;
}

/* ---------- Profile Menu ---------- */
#menu, #nav {
    list-style: none;
}

#menu li {
    display: inline-block;
}

#menu a {
    height: 50px;
    line-height: 40px;
    padding: 0 20px;
    display: block;
    border: 5px solid transparent;
    border-bottom-width: 0;
    text-decoration: none;
    background: transparent;
    color: inherit;
    border-radius: 6px 6px 0 0;
}

#menu a.active {
    background: #FFF;
    border-color: #E6E6E6;
}

#nav {
    width: 100%;
    height: 49px;
    margin-bottom: 20px;
    display: flex;
    overflow: hidden;
    background: #E6E6E6;
	border-radius: 6px;
}

#nav a {
    flex: 1;
    text-align: center;
    line-height: 50px;
    text-decoration: none;
}

#nav a:hover,
#nav a.active {
    background: #C7C7C7;
}

/* ---------- Pagination ---------- */
.pagination {
    padding: var(--profile-pagination-padding, 10px) var(--profile-pagination-padding, 20px);
    margin-bottom: 20px;
    background: var(--profile-pagination, #E6E6E6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 5px;
}

.pagination .prev,
.pagination .next {
    color: inherit;
    font-weight: bold;
    text-decoration: none;
}

.pagination .details {
    margin: 0 auto;
    text-align: center;
    white-space: nowrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    #container {
        display: grid;
        grid-template-areas:
            "sidebar"
            "main"
            "footer";
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 50px;
        gap: 15px;
        width: auto;
        padding: 0;
        margin: 85px 15px 15px 15px;
        background: #F2F2F2;
        border-radius: 0;
        box-shadow: none;
    }

    #topbar {
        display: block;
        grid-area: topbar;
        width: calc(100% - 30px);
        height: 50px;
        position: absolute;
        top: 15px;
        left: 15px;
        right: 15px;
        background-color: #F19620;
        border-radius: 5px;
    }

    #header {
        display: none;
    }

    #taskbar {
        width: 220px;
        height: calc(100%);
        position: fixed;
        top: 0;
        left: 10px;
        z-index: 900;
        opacity: 0;
        overflow-y: auto;
        transform: translateX(-100%);
        border-radius: 5px;
        box-shadow: 3px 0 10px rgba(0,0,0,0.3);
        transition: transform 0.35s ease, opacity 0.35s ease;
    }

    #taskbar.open {
        transform: translateX(0);
        opacity: 1;
    }
}
