*,
*::after,
*::before {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
  border: 0;
}

html {
    box-sizing: border-box;
}

body{
    background-color: var(--background);
    transition: background-color 1s;
    color: var(--text);
    display: flex;
}

body.hide-reminders-active #main-reminders-area {
    display: none !important;
}

body, html {
    width: 100svw;
    height: 100svh;
    display: flex;
    flex-direction: column;
}

.content--wrapper {
    display: flex;
    flex-direction: column;
    width: 100svw;
    height: 100svh;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.selector{
    margin-top: 0.5em;
    margin-left: 1em;
    width: 10em;
    height: 2em;
    font-family: "Ubuntu", sans-serif;
    background-color: var(--background);
    color: var(--text);
}

.welcome-message {
    font-family: "Ubuntu", sans-serif;
    font-size: 2em;
    margin-bottom: 2em;
    transition: background-color 1s;
    min-height: 1.2em;
    overflow: hidden;
    width: 100%;
    text-align: center;
}

.quote-box {
    color: var(--primary); 
    font-family: 'Ubuntu', sans-serif; 
    font-size: 0.7em;
    text-align: center; 
    margin-top: 20px; 
    font-style: italic;
    height: 1.2em;
    width: 100%;
}

.link-section {
    background-color: var(--contrast2);
    transition: background-color 1s;
    box-shadow: 0px 0px 30px #000000;
}

.link-section-name img {
    color: var(--text);
}

.page-link {
    background-color: var(--contrast);
    transition: background-color 0.5s, box-shadow 1s;
}

.page-link:hover {
    background-color: var(--primary);
    box-shadow: 0px 0px 20px var(--primary);
}

.page-link:hover .link-img {
    padding: 5px;
}

.links-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5em;
}

.link-section {
    padding: 1em;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 1em;
}

.link-section-name {
    display: flex;
    align-items: center;
    gap: 0.20em;
    justify-content: center;
    font-family: "Ubuntu", sans-serif;
    font-size: 2em;
    position: relative;
}

.link-section-name::before {
    content: "";
    position: absolute;
    height: 0.3em;
    width: 110%;
    left: 50%;
    transform: translate(-50%, 0);
    bottom: 0;
    transition: height 0.5s;
}

.link-section-name:hover::before {
    height: 0.6em;
}

.link-section-name img {
    height: 1em;
    aspect-ratio: 1/1;
}

.link-section__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1em;
}

.page-link {
    width: 7em;
    height: 7em;
    border-radius: 10px;
    padding: 1em;
}

.link-img {
    width: 100%;
    transition: padding 0.3s;
    filter: grayscale(var(--text));
}

.footer {
    height: 2em;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 5em;
}

.footer_text {
    font-family: "Ubuntu", sans-serif;
    font-size: 13px;
    transition: color 0.5s, font-size 0.2s;
    padding: 5px;
}


.footer_text:hover {
    color: var(--primary);
    font-size: 14px;
}


.footer_img {
    width: 18px;
    height: 15px;
    fill: var(--contrast);
}

.settings-panel {
   position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--contrast2); 
    color: var(--text);
    padding: 1.5em;
    border-radius: 8px;
    box-shadow: 0px 0px 20px #000000;
    font-family: "Ubuntu", sans-serif;
    border: 1px solid var(--primary);
    z-index: 1000;
    display: none;
}

.settings-panel.active {
    display: block !important;
}

#settings-controls {
    max-height: 450px;
    overflow-y: auto;
    padding-right: 10px;
}

.hidden { display: none !important; }

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 320px;
    height: 100vh;
    background-color: var(--contrast2);
    border-right: 1px solid var(--primary);
    box-shadow: 5px 0 25px rgba(0,0,0,0.5);
    z-index: 2000;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 25px;
    font-family: "Ubuntu", sans-serif;
}

.sidebar-hidden {
    transform: translateX(-100%);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2em;
    border-bottom: 1px solid var(--contrast);
    padding-bottom: 12px;
}

.sidebar-title {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    font-size: 0.85em;
    font-weight: bold;
}

.sidebar-close-btn {
    background: none;
    color: var(--text);
    cursor: pointer;
    font-size: 0.7em;
    text-transform: uppercase;
    opacity: 0.6;
}

.sidebar-close-btn:hover {
    opacity: 1;
}

.agenda-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 2.5em;
}

.agenda-input-group input {
    background: var(--background);
    color: var(--text);
    border: 1px solid var(--contrast);
    padding: 10px;
    font-family: "Ubuntu", sans-serif;
    outline: none;
}

.agenda-desc {
    background: var(--background);
    color: var(--text);
    border: 1px solid var(--contrast);
    padding: 10px;
    font-family: "Ubuntu", sans-serif;
    resize: none;
    height: 80px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.agenda-input-group input:focus {
    border-color: var(--primary);
}

.add-task-btn {
    background: var(--primary);
    color: var(--background);
    padding: 10px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.75em;
    font-weight: bold;
    transition: opacity 0.2s;
}

.task-item {
    background: var(--contrast);
    padding: 15px;
    margin-bottom: 12px;
    border-left: 3px solid var(--primary);
    position: relative;
}

.task-date {
    display: block;
    font-size: 0.7em;
    margin-top: 8px;
    color: var(--primary);
    opacity: 0.8;
}

.pc-trigger {
    position: fixed;
    left: 25px;
    bottom: 25px;
    background: var(--contrast2);
    color: var(--text);
    border: 1px solid var(--primary);
    padding: 12px 20px;
    cursor: pointer;
    font-family: "Ubuntu", sans-serif;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 1900;
}

.pc-trigger:hover {
    background: var(--primary);
    color: var(--background);
}

@media (max-width: 768px) {
    .sidebar, .pc-trigger {
        display: none !important;
    }
}

.reminders-overlay {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 280px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-height: 85vh;
}

.reminders-scroll-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 8px;
    pointer-events: auto;
}


.reminder-card {
    pointer-events: auto;
    background: var(--contrast2);
    border-left: 3px solid var(--primary);
    padding: 12px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    font-family: 'Ubuntu', sans-serif;
    animation: slideIn 0.4s ease forwards;
    transition: color 0.3s;
}

.reminder-card:hover {
    color: var(--text);
}

.reminder-title {
    color: var(--primary);
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.reminder-desc-text {
    color: var(--text);
    font-size: 0.75em;
    opacity: 0.7;
    line-height: 1.4;
    display: block;
    word-wrap: break-word;
}

.reminders-hidden {
    display: none !important;
}

.reminders-scroll-container::-webkit-scrollbar {
    width: 4px;
}

.reminders-scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.tasks-scroll-area {
    max-height: calc(100vh - 380px); 
    overflow-y: auto;
    padding-right: 10px;
    margin-top: 15px;
}

.tasks-scroll-area::-webkit-scrollbar {
    width: 4px;
}

.tasks-scroll-area::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

@media (max-width: 768px) {
    .reminders-overlay {
        display: none !important;
    }
}


@keyframes slideIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 768px) {
    .reminders-overlay {
        display: none !important;
    }
}


.mobile-only { display: none; }

@media (max-width: 768px) {
    body, html {
        height: auto;
        width: 100%;
        overflow-x: hidden;
    }

    body {
        padding: 20px 10px;
    }

    .content--wrapper {
        height: auto;
        width: 100%;
        flex-wrap: nowrap;
    }

    .welcome-message {
        font-size: 1.5em;
        margin-bottom: 1em;
    }

    .links-block {
        flex-direction: column;
        gap: 30px;
        width: 100%;
    }

    .link-section {
        width: 90%;
    }

    .link-section__grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 12px;
    }

    .page-link {
        width: 100%;
        height: 4.5em;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .link-img {
        width: 40px;
        height: 40px;
    }

    .footer {
        margin-top: 3em;
        height: auto;
        gap: 10px;
    }

    .footer_img {
        width: 24px;
        height: 24px;
    }

    .settings-panel {
        width: 90% !important;
        left: 5% !important;
        right: 5% !important;
        max-height: 70vh;
        overflow-y: auto;
    }

    .mobile-only {
        display: flex;
        position: fixed;
        bottom: 20px;
        right: 20px;
        background: var(--primary);
        color: var(--background);
        border-radius: 50%;
        width: 55px;
        height: 55px;
        justify-content: center;
        align-items: center;
        z-index: 2000;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    }
}

#hide-reminders-btn {
    position: relative !important;
    z-index: 9999 !important; 
    pointer-events: auto !important;
    cursor: pointer !important;
}

.reminders-overlay div {
    pointer-events: auto !important;
}