:root {
    --background: #0b0d11;

    --panel: rgba(22, 25, 32, 0.72);
    --panel-hover: rgba(30, 34, 43, 0.82);

    --border: rgba(255, 255, 255, 0.08);

    --text: #f5f7fa;
    --muted: #9298a5;
    --subtle: #666d79;

    --accent: #6ea8ff;
    --accent-soft: rgba(110, 168, 255, 0.12);

    --danger: #ff7777;

    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;

    background:
        radial-gradient(circle at 50% -20%,
            rgba(80, 110, 170, 0.13),
            transparent 45%),
        var(--background);

    color: var(--text);

    font-family: "Inter", sans-serif;

    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.dashboard {
    width: min(1050px, calc(100% - 40px));

    margin: 0 auto;

    padding: 70px 0 35px;
}


/* TOP */

.topbar {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 30px;
}

.greeting {
    margin: 0 0 10px;

    color: var(--muted);

    font-size: 15px;

    font-weight: 500;
}

#clock {
    margin: 0;

    font-family: "Plus Jakarta Sans", sans-serif;

    font-size: clamp(48px, 7vw, 72px);

    line-height: 0.95;

    letter-spacing: -4px;

    font-weight: 700;
}

.date {
    margin: 14px 0 0;

    color: var(--muted);

    font-size: 15px;
}


/* WEATHER */

.weather-card {
    width: 330px;

    padding: 20px;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    backdrop-filter: blur(18px);

    -webkit-backdrop-filter: blur(18px);
}

.weather-main {
    display: flex;

    align-items: center;

    gap: 14px;
}

.weather-icon {
    font-size: 40px;

    line-height: 1;
}

.temperature {
    font-size: 34px;

    line-height: 1;

    font-weight: 700;

    letter-spacing: -1.5px;
}

.condition {
    margin-top: 6px;

    color: var(--muted);

    font-size: 13px;
}

.weather-location {
    margin-top: 18px;

    font-size: 14px;

    font-weight: 600;
}

.weather-details {
    display: flex;

    flex-wrap: wrap;

    gap: 8px 18px;

    margin-top: 15px;

    color: var(--muted);

    font-size: 11px;
}

.weather-details b {
    color: var(--text);

    font-weight: 500;
}


/* LAUNCHER */

.launcher-section {
    margin-top: 65px;
}

.launcher {
    display: flex;

    align-items: center;

    gap: 13px;

    height: 62px;

    padding: 0 18px;

    background: rgba(20, 23, 29, 0.82);

    border: 1px solid var(--border);

    border-radius: 16px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.launcher:focus-within {
    border-color: rgba(110, 168, 255, 0.45);

    background: rgba(25, 29, 37, 0.92);

    box-shadow:
        0 0 0 4px rgba(110, 168, 255, 0.07);
}

.search-icon {
    color: var(--muted);

    font-size: 29px;

    line-height: 1;

    transform: rotate(-15deg);
}

.launcher input {
    flex: 1;

    min-width: 0;

    border: 0;

    outline: 0;

    background: transparent;

    color: var(--text);

    font-size: 16px;
}

.launcher input::placeholder {
    color: var(--subtle);
}

kbd {
    padding: 5px 8px;

    border: 1px solid var(--border);

    border-radius: 6px;

    background: rgba(255, 255, 255, 0.04);

    color: var(--muted);

    font-size: 11px;
}

.launcher-hint {
    margin: 10px 4px 0;

    color: var(--subtle);

    font-size: 11px;
}

.launcher-hint strong {
    color: var(--muted);

    font-weight: 500;
}


/* SHORTCUTS */

.quick-section {
    margin-top: 55px;
}

.section-heading {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0;

    font-size: 17px;

    letter-spacing: -0.3px;
}

.section-heading p {
    margin: 5px 0 0;

    color: var(--muted);

    font-size: 12px;
}

.add-button {
    display: flex;

    align-items: center;

    gap: 7px;

    padding: 9px 13px;

    border: 1px solid var(--border);

    border-radius: 9px;

    background: rgba(255, 255, 255, 0.04);

    color: var(--muted);

    font-size: 12px;

    transition: 0.2s ease;
}

.add-button span {
    font-size: 18px;

    line-height: 10px;
}

.add-button:hover {
    background: rgba(255, 255, 255, 0.08);

    color: var(--text);
}

.quick-links {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 12px;
}

.quick-link {
    position: relative;

    display: flex;

    align-items: center;

    gap: 13px;

    min-height: 72px;

    padding: 15px;

    border: 1px solid var(--border);

    border-radius: 14px;

    background: var(--panel);

    color: var(--text);

    text-decoration: none;

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.quick-link:hover {
    transform: translateY(-2px);

    background: var(--panel-hover);

    border-color: rgba(255, 255, 255, 0.13);
}

.link-icon {
    display: grid;

    place-items: center;

    width: 38px;

    height: 38px;

    flex-shrink: 0;

    border-radius: 10px;

    background: var(--accent-soft);

    color: var(--accent);

    font-size: 15px;

    font-weight: 600;
}

.link-info {
    min-width: 0;
}

.link-name {
    overflow: hidden;

    font-size: 13px;

    font-weight: 600;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.link-url {
    overflow: hidden;

    margin-top: 4px;

    color: var(--muted);

    font-size: 10px;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.delete-link {
    position: absolute;

    top: 7px;

    right: 7px;

    width: 23px;

    height: 23px;

    border: 0;

    border-radius: 6px;

    background: transparent;

    color: var(--subtle);

    opacity: 0;

    transition: 0.15s ease;
}

.quick-link:hover .delete-link {
    opacity: 1;
}

.delete-link:hover {
    background: rgba(255, 80, 80, 0.12);

    color: var(--danger);
}


/* WIDGETS */

.widgets-section {
    margin-top: 45px;
}

.widget-grid {
    display: grid;

    grid-template-columns: 1.15fr 1fr;

    gap: 12px;
}

.widget {
    padding: 18px;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    backdrop-filter: blur(18px);

    -webkit-backdrop-filter: blur(18px);
}

.notes-widget {
    min-height: 235px;
}

.calendar-widget {
    min-height: 235px;
}

.recent-widget {
    grid-column: 1 / -1;
}

.widget-header {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 15px;

    margin-bottom: 16px;
}

.widget-header h2 {
    margin: 0;

    font-family: "Plus Jakarta Sans", sans-serif;

    font-size: 14px;

    font-weight: 600;
}

.widget-header p {
    margin: 4px 0 0;

    color: var(--muted);

    font-size: 11px;
}

.widget-action {
    padding: 6px 9px;

    border: 1px solid var(--border);

    border-radius: 7px;

    background: rgba(255, 255, 255, 0.035);

    color: var(--muted);

    font-size: 10px;
}

.widget-action:hover {
    background: rgba(255, 255, 255, 0.07);

    color: var(--text);
}


/* NOTES */

#quickNote {
    display: block;

    width: 100%;

    min-height: 130px;

    resize: vertical;

    padding: 12px;

    border: 1px solid var(--border);

    border-radius: 11px;

    outline: 0;

    background: rgba(10, 13, 18, 0.4);

    color: var(--text);

    font-size: 12px;

    line-height: 1.6;
}

#quickNote:focus {
    border-color: rgba(110, 168, 255, 0.35);
}

#quickNote::placeholder {
    color: var(--subtle);
}

.note-status {
    margin-top: 8px;

    color: var(--subtle);

    font-size: 10px;

    text-align: right;
}


/* CALENDAR */

.calendar-controls {
    display: flex;

    gap: 5px;
}

.calendar-controls button {
    width: 27px;

    height: 27px;

    border: 1px solid var(--border);

    border-radius: 7px;

    background: rgba(255, 255, 255, 0.035);

    color: var(--muted);

    font-size: 18px;

    line-height: 1;
}

.calendar-controls button:hover {
    background: rgba(255, 255, 255, 0.07);

    color: var(--text);
}

.calendar-weekdays,
.calendar-days {
    display: grid;

    grid-template-columns: repeat(7, 1fr);
}

.calendar-weekdays {
    margin-bottom: 7px;
}

.calendar-weekdays span {
    color: var(--subtle);

    font-size: 9px;

    text-align: center;
}

.calendar-day {
    display: grid;

    place-items: center;

    height: 28px;

    border-radius: 7px;

    color: var(--muted);

    font-size: 11px;
}

.calendar-day:not(.empty):hover {
    background: rgba(255, 255, 255, 0.06);

    color: var(--text);
}

.calendar-day.today {
    background: var(--accent-soft);

    color: var(--accent);

    font-weight: 600;
}


/* RECENT */

.recent-list {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 9px;
}

.recent-item {
    position: relative;

    display: flex;

    align-items: center;

    gap: 10px;

    min-width: 0;

    padding: 11px;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.025);

    color: var(--text);

    text-decoration: none;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.recent-item:hover {
    background: rgba(255, 255, 255, 0.055);

    border-color: rgba(255, 255, 255, 0.12);
}

.recent-icon {
    display: grid;

    place-items: center;

    width: 31px;

    height: 31px;

    flex-shrink: 0;

    border-radius: 8px;

    background: var(--accent-soft);

    color: var(--accent);

    font-size: 11px;

    font-weight: 600;
}

.recent-info {
    min-width: 0;
}

.recent-name {
    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 11px;

    font-weight: 600;
}

.recent-url {
    overflow: hidden;

    margin-top: 3px;

    color: var(--muted);

    font-size: 9px;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.empty-recent {
    grid-column: 1 / -1;

    padding: 20px;

    color: var(--subtle);

    font-size: 11px;

    text-align: center;
}


/* FOOTER */

footer {
    margin-top: 55px;

    color: var(--subtle);

    text-align: center;

    font-size: 10px;
}

footer a {
    color: var(--muted);

    text-decoration: none;
}

footer a:hover {
    color: var(--text);
}

.footer-button {
    padding: 0;

    border: 0;

    background: transparent;

    color: var(--muted);

    font-size: 10px;
}

.footer-button:hover {
    color: var(--text);
}


/* MODALS */

.modal {
    position: fixed;

    inset: 0;

    display: grid;

    place-items: center;

    padding: 20px;

    z-index: 100;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;

    inset: 0;

    background: rgba(0, 0, 0, 0.62);

    backdrop-filter: blur(8px);

    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;

    z-index: 1;

    width: min(430px, 100%);

    max-height: calc(100vh - 40px);

    overflow-y: auto;

    padding: 24px;

    border: 1px solid var(--border);

    border-radius: 18px;

    background: rgba(21, 24, 30, 0.94);

    backdrop-filter: blur(20px);

    -webkit-backdrop-filter: blur(20px);
}

.modal-header {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 24px;
}

.modal-header h2 {
    margin: 0;

    font-family: "Plus Jakarta Sans", sans-serif;

    font-size: 18px;
}

.modal-header p {
    margin: 5px 0 0;

    color: var(--muted);

    font-size: 12px;
}

.close-button {
    width: 32px;

    height: 32px;

    border: 0;

    border-radius: 8px;

    background: rgba(255, 255, 255, 0.04);

    color: var(--muted);

    font-size: 20px;
}

.close-button:hover {
    color: var(--text);

    background: rgba(255, 255, 255, 0.08);
}


/* FORM */

#addLinkForm label {
    display: block;

    margin-bottom: 16px;

    color: var(--muted);

    font-size: 12px;
}

#addLinkForm input {
    display: block;

    width: 100%;

    height: 44px;

    margin-top: 7px;

    padding: 0 12px;

    border: 1px solid var(--border);

    border-radius: 9px;

    outline: 0;

    background: rgba(255, 255, 255, 0.04);

    color: var(--text);

    font-size: 13px;
}

#addLinkForm input:focus {
    border-color: rgba(110, 168, 255, 0.45);
}

.modal-actions {
    display: flex;

    justify-content: flex-end;

    gap: 9px;

    margin-top: 22px;
}

.secondary-button,
.primary-button,
.danger-button {
    padding: 10px 14px;

    border-radius: 9px;

    font-size: 12px;
}

.secondary-button {
    border: 1px solid var(--border);

    background: transparent;

    color: var(--muted);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.05);

    color: var(--text);
}

.primary-button {
    border: 0;

    background: var(--accent);

    color: #07101f;

    font-weight: 600;
}

.primary-button:hover {
    filter: brightness(1.08);
}


/* SETTINGS */

.settings-content {
    width: min(480px, 100%);
}

.settings-list {
    display: flex;

    flex-direction: column;

    gap: 24px;
}

.setting-group {
    padding-bottom: 20px;

    border-bottom: 1px solid var(--border);
}

.setting-group:last-child {
    border-bottom: 0;

    padding-bottom: 0;
}

.setting-label {
    display: flex;

    flex-direction: column;

    gap: 4px;

    margin-bottom: 14px;
}

.setting-label strong {
    font-size: 13px;
}

.setting-label span {
    color: var(--muted);

    font-size: 11px;
}

.setting-row {
    display: flex;

    justify-content: space-between;

    align-items: center;

    min-height: 38px;

    color: var(--muted);

    font-size: 12px;
}

.setting-row input {
    width: 17px;

    height: 17px;

    accent-color: var(--accent);

    cursor: pointer;
}

.unit-buttons {
    display: flex;

    gap: 8px;
}

.unit-button {
    padding: 9px 12px;

    border: 1px solid var(--border);

    border-radius: 8px;

    background: rgba(255, 255, 255, 0.04);

    color: var(--muted);

    font-size: 11px;
}

.unit-button:hover {
    background: rgba(255, 255, 255, 0.08);

    color: var(--text);
}

.unit-button.active {
    border-color: rgba(110, 168, 255, 0.35);

    background: var(--accent-soft);

    color: var(--accent);
}

.full-button {
    width: 100%;
}

.danger-group {
    border-bottom: 0;
}

.danger-button {
    border: 1px solid rgba(255, 119, 119, 0.18);

    background: rgba(255, 80, 80, 0.06);

    color: #ff8888;
}

.danger-button:hover {
    background: rgba(255, 80, 80, 0.11);
}


/* RESPONSIVE */

@media (max-width: 800px) {

    .dashboard {
        width: min(100% - 28px, 650px);

        padding-top: 40px;
    }

    .topbar {
        flex-direction: column;
    }

    .weather-card {
        width: 100%;
    }

    .quick-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .widget-grid {
        grid-template-columns: 1fr;
    }

    .recent-widget {
        grid-column: auto;
    }

    .recent-list {
        grid-template-columns: 1fr;
    }

    .launcher-section {
        margin-top: 40px;
    }
}

@media (max-width: 450px) {

    .quick-links {
        grid-template-columns: 1fr;
    }

    kbd {
        display: none;
    }

    .dashboard {
        width: calc(100% - 24px);
    }
}