/* General Styling */
body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* Header and Search Bar */
header {
    background-color: #1e1e1e;
    padding: 15px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

#search-input {
    width: 100%;
    padding: 12px 15px;
    background-color: #2c2c2c;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    box-sizing: border-box;
}

#search-input::placeholder {
    color: #888;
}

/* Results Container */
#results-container {
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 5px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.result-item:hover {
    background-color: #2a2a2a;
}

.result-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 15px;
    flex-shrink: 0;
}

.result-info {
    overflow: hidden;
}

.result-info .caption {
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-info .author {
    font-size: 0.85em;
    color: #aaa;
    margin: 4px 0 0;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    padding-top: 60px;
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 700px;
}

#modal-image {
    width: 100%;
    border-radius: 8px;
}

#modal-details {
    text-align: left;
    padding: 15px;
    color: #ccc;
    line-height: 1.6;
}

#modal-caption {
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 1.5em;
    color: #fff;
}

#modal-details p {
    margin: 5px 0;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #bbb;
    text-decoration: none;
}
