﻿* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Heebo', sans-serif;
    background: linear-gradient(to bottom, #e3f2fd, #ffffff);
    color: #1e293b;
    padding-top: 100px;
    outline: 1px dashed rgba(255,0,0,0.3);
}

html, body {
    height: 100%;
    background: linear-gradient(to bottom, #e3f2fd, #ffffff);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    overflow-x: hidden !important;
}

.top-bar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

    .top-bar .nav-links {
        display: flex;
        gap: 1rem;
    }

    .top-bar a {
        text-decoration: none;
        color: #0d47a1;
        background: #e3f2fd;
        padding: 0.5rem 1rem;
        border-radius: 1.5rem;
        font-weight: bold;
        transition: background-color 0.2s;
        font-size: 0.95rem;
    }

        .top-bar a:hover {
            background: #bbdefb;
        }

    .top-bar img {
        height: 42px;
        margin-inline-start: 10px;
    }

h1 {
    text-align: center;
    color: #0d47a1;
    margin: 1rem 0 0.5rem;
    font-size: 2rem;
    text-shadow: 1px 1px 0 #fff;
}

.search-wrapper {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0 0.5rem;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 500px;
}

    .search-box input {
        width: 100%;
        padding: 0.8rem 0rem 0.8rem 0rem;
        text-indent: 3rem;
        border-radius: 2rem;
        border: 1px solid #90caf9;
        background: #f0f7ff;
        box-shadow: 0 3px 10px rgba(0,0,0,0.06);
        font-size: 1rem;
        outline: none;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

        .search-box input:focus {
            border-color: #1976d2;
            box-shadow: 0 4px 14px rgba(0,0,0,0.12);
            background: #e3f2fd;
        }

.icon-container {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
}

    .icon-container svg {
        width: 100%;
        height: 100%;
        fill: #1976d2;
    }

.clear-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    font-size: 20px;
    color: #1976d2;
    cursor: pointer;
    display: none;
}

#results-count {
    text-align: center;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.links-container {
    max-width: 700px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 1rem 3rem;
}

#links-container {
    max-width: 800px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.link-box {
    display: block;
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: #0d47a1;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .link-box:hover {
        transform: scale(1.02);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    }

.link-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.4rem;
}

.link-desc {
    color: #455a64;
    font-size: 0.95rem;
}

.edit-area {
    display: none;
    margin-top: 1rem;
}

    .edit-area input,
    .edit-area textarea {
        width: 100%;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
        font-size: 0.95rem;
        border: 1px solid #ccc;
        border-radius: 0.4rem;
    }

.edit-buttons {
    display: flex;
    gap: 0.5rem;
}

    .edit-buttons button {
        flex: 1;
        padding: 0.5rem;
        font-weight: bold;
        border: none;
        border-radius: 0.4rem;
        cursor: pointer;
    }

.save-btn {
    background: #1976d2;
    color: white;
}

.delete-btn {
    background: #d32f2f;
    color: white;
}

#add-link {
    display: block;
    margin: 2rem auto 0;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    background: #388e3c;
    color: white;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
}

#message {
    text-align: center;
    margin-top: 1rem;
    font-weight: bold;
}

.highlight {
    background: #fff59d;
    font-weight: bold;
    padding: 0 2px;
    border-radius: 4px;
}

@media (max-width: 600px) {
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

.author-label {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: #e3f2fd;
    color: #0d47a1;
    font-size: 0.8rem;
    font-weight: bold;
    font-family: 'Heebo', sans-serif;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #90caf9;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    user-select: none;
    z-index: 10;
}

