body,
input,
textarea {
    color: #888888;
    font-size: 18px;
    font-family: "Roboto", "lucida grande", sans-serif;
    background: #080210;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #121212;
    color: #ddd;
    overflow-x: hidden;
}

* {
    box-sizing: border-box; /* Gör så att padding och border inkluderas i elementens totala bredd/höjd */
}

/* Topbar styling */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 20px;
    background-color: #333333;
}

.topbar a {
    color: #ddd;
    text-decoration: none;
    margin-right: 20px;
}

.topbar a:hover {
    color: #ff4c4c;
}

.breadcrumbs {
    flex: 1;
    color: #ddd;
}

.breadcrumbs a {
    color: #ff4c4c;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Search styling */
#search-bar {
    position: relative;
    margin-right: 20px;
    display: inline-block;
}

#search-input {
    padding: 5px;
    font-size: 16px;
}

#search-results {
    background-color: #333;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    list-style-type: none;
    margin-top: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: absolute;
    z-index: 1000;
}

#search-results li {
    margin-bottom: 5px;
}

#search-results li a {
    color: #ff4c4c;
    text-decoration: none;
}

#search-results li a:hover {
    text-decoration: underline;
}

/* Main container */
.main-container {
    display: flex;
    align-items: flex-start;
    margin-top: 20px;
    width: 90%;
    max-width: 1200px;
    overflow: hidden;
}

/* Related Tags styling */
.top-keywords {
    width: 250px;
    margin-right: 20px;
    padding: 10px;
    background-color: #1a1a1a;
    border-radius: 4px;
}

.top-keywords h3 {
    color: #ff4c4c;
    font-size: 1.2em;
    margin-bottom: 10px;
    text-align: left;
}

.top-keywords ul {
    list-style: none;
    padding: 0;
}

.top-keywords li {
    margin-bottom: 8px;
}

.top-keywords li a {
    color: #ff4c4c;
    text-decoration: none;
}

.top-keywords li a:hover {
    text-decoration: underline;
}

/* Gallery styling */
.gallery-container {
    flex: 1;
    width: 100%;
}

#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    justify-items: center;
    width: 100%;
}

.image-link {
    position: relative;
    display: inline-block;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1;
    transition: transform 0.3s ease-out;
}

.image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/*.image-link img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    transition: transform 0.3s ease; /* Liten zoom-effekt vid hover */
}*/

.image-link img:hover {
    transform: scale(1.05); /* Zooma in lite när användaren hovrar */
}

.image-link:hover {
    transform: scale(1.05);
}

.image-link .h6-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.9em;
    text-align: center;
    display: none;
}

.image-link:hover .h6-text {
    display: block;
}

/* Top Clicked Title */
.top-clicked-title {
    text-align: center;
    margin: 20px auto;
}

.top-clicked-title h3 {
    color: #ff4c4c;
    font-size: 1.5em;
}

/* Pagination styling */
.pagination-container {
    text-align: center;
    margin: 20px 0;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
.pagination a {
    padding: 10px 20px;
    background: #333;
    color: #fff;
    text-decoration: none;
    margin: 0 5px;
    border-radius: 5px;
    transition: background 0.3s ease;
}
.pagination a:hover {
    background: #555;
}

/* Footer styling */
.footerbar {
    width: 100%;
    background-color: #333333;
    text-align: center;
    padding: 15px 0;
    color: #ddd;
}

.footerbar a {
    color: #e60000;
    text-decoration: none;
}

.footerbar a:hover {
    text-decoration: underline;
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover {
    color: #ff4c4c;
}

/* Responsive Styling */
@media only screen and (max-width: 768px) {
    .main-container {
        flex-direction: column;
        align-items: center;
    }

    .top-keywords {
        width: 100%;
        margin-bottom: 20px;
    }

    #gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}	
		body.light-mode {
			background-color: #f1eded;
			color: #000000; /* Se till att texten är läsbar i light mode */
		}

		/* Justera länkfärger för light mode */
		body.light-mode .view-toggle a,
		body.light-mode .keyword-view-toggle a,
		body.light-mode .search-result-item a {
			color: #000080; /* Mörk färg som kontrasterar bättre mot ljus bakgrund */
		}

		body.light-mode .view-toggle a.active,
		body.light-mode .keyword-view-toggle a.active,
		body.light-mode .search-result-item a:hover {
			color: #0000FF; /* För aktiva länkar eller när användaren hovrar */
		}

		body.light-mode .view-toggle a:hover,
		body.light-mode .keyword-view-toggle a:hover,
		body.light-mode .search-result-item a:hover {
			background-color: rgba(200, 200, 200, 0.5); /* Justera hover-effekten för bättre synlighet i light mode */
		}

		/* Standardfärger för dark mode eller ingen mode */
		.view-toggle a,
		.keyword-view-toggle a,
		.search-result-item a {
			color: lightblue;
			text-decoration: none;
			padding: 10px;
			margin-right: 5px;
			border-radius: 5px;
			transition: background-color 0.3s, color 0.3s;
			font-size: 0.6em;
		}

		.view-toggle a.active,
		.keyword-view-toggle a.active,
		.search-result-item a:hover {
			color: lightblue;
			font-weight: bold;
		}

		.view-toggle a:hover,
		.keyword-view-toggle a:hover,
		.search-result-item a:hover {
			background-color: rgba(0, 0, 0, 0.1);
			text-decoration: underline;
		}
        .lazy-hidden {
            visibility: hidden;
            height: 0;
        }
        .image-link {
            position: relative;
        }
        .image-link .h6-text {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            color: #fff;
            background-color: rgba(0, 0, 0, 0.7);
            padding: 5px;
            border-radius: 0;
            text-align: center;
            display: none;
        }
        .image-link:hover .h6-text {
            display: block;
        }
        #imageModal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.9);
            justify-content: center;
            align-items: center;
        }
        #imageModal img {
            max-width: 90%;
            max-height: 80%;
        }
        .modal-close {
            position: absolute;
            top: 20px;
            right: 20px;
            color: #fff;
            font-size: 30px;
            cursor: pointer;
        }
        #theme-toggle {
            cursor: pointer;
            padding: 10px;
            color: #fff;
            border: 1px solid #fff;
            border-radius: 5px;
            background-color: #333;
            position: absolute;
            right: 20px;
            top: 20px;
        }
		.search-results-title {
			text-align: center;
			margin-bottom: 20px;
			font-size: 1.5em;
			color: #ff4c4c; /* Gör rubriken tydlig och synlig */
		}

		/*
		.search-results-gallery {
			display: grid;
			grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
			gap: 10px;
			justify-items: center;
			/*margin: 0 auto;
			/*max-width: 1200px;
			width: 100%;
		}*/
/*
#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    justify-items: center;
    width: 100%;
}*/		

		/* Enskilda sökresultat */
		.search-result-item {
			text-align: center;
		}
		