.goldman-regular {
  font-family: "Goldman", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.goldman-bold {
  font-family: "Goldman", sans-serif;
  font-weight: 700;
  font-style: normal;
}

html{scroll-behavior: smooth}
.btn{position:fixed;right:50px;bottom:50px}

:root {
	/* Default Text Styles */
	--text-link: #1e87f0;
	--text-muted: #999;
	--text-success: #32d296;
	--text-warning: #faa05a;
	--text-danger: #f0506e;
	
	/* Default Button Styles */
	--primary-bg: #1e87f0;
	--primary-hover: #0f7ae5;  
	--secondary-bg: #f0506e;
	--secondary-hover: #ee395b; 

	/* Light Theme */
	--bg-color: #ffffff;
	--text-color: #000000;
	--card-color: #f2f2f2;
	--card-border: #e6e6e6;
	--nav-text: #000000;
	--nav-hover: #ffffff;
	--tertiary-bg: #222222;
	--tertiary-hover: #151515;
	--tertiary-text: #d4d4d4;
	--tag-bg: #e1e1e1;
	--tag-hover: #d4d4d4;
	--tag-text: #151515;
}

body.theme-dark {
	--bg-color: #25282c;
	--text-color: #ffffff;
	--card-color: #2e3136;
	--card-border: #373a3f;
	--nav-text: #ffffff;
	--nav-hover: #25282c;
	--tertiary-bg: #e1e1e1;
	--tertiary-hover: #d4d4d4;
	--tertiary-text: #151515;
	--tag-bg: #222222;
	--tag-hover: #151515;
	--tag-text: #d4d4d4;	
}

body.theme-solarized {
	--bg-color: #fdf6e3;         /* Solarized Base3 */
	--text-color: #657b83;       /* Solarized Base00 */
	--card-color: #eee8d5;       /* Solarized Base2 */
	--card-border: #93a1a1;      /* Solarized Base1 */
	--nav-text: #657b83;         /* Solarized Base00 */
	--nav-hover: #fdf6e3;        /* Same as background */

	--tertiary-bg: #93a1a1;      /* Base1 as soft background */
	--tertiary-hover: #839496;   /* Slightly darker hover */
	--tertiary-text: #002b36;    /* Base03 for contrast */

	--tag-bg: #eee8d5;           /* Same as card background */
	--tag-hover: #e5ddc9;        /* Slightly darker than card */
	--tag-text: #586e75;         /* Base01, subtle */
}

body.theme-happyhardcore {
    /* Base colors */
    --bg-color: #111111;           /* Deep black background */
    --text-color: #ffffff;         /* White text for contrast */
    --card-color: #1c1c1c;         /* Slightly lighter black cards */
    --card-border: #333333;        /* Subtle dark gray borders */

    /* Navigation */
    --nav-text: #ffffff;           /* White nav links */
    --nav-hover: #E5BC70;          /* Bright yellow hover to match smiley */

    /* Primary accents (buttons/links) */
    --primary-bg: #E5BC70;         /* Happy yellow */
    --primary-hover: #e1b25a;      /* Stronger yellow hover */
    --secondary-bg: #f0506e;       /* Hardcore red/pink accent */
    --secondary-hover: #d43d5b;    /* Darker hover */

    /* Tertiary background (footer/alt blocks) */
    --tertiary-bg: #222222;
    --tertiary-hover: #333333;
    --tertiary-text: #E5BC70;      /* Yellow tertiary text for glow */

    /* Status text colors */
    --text-link: #E5BC70;          /* Yellow links */
    --text-muted: #aaaaaa;         /* Muted gray */
    --text-success: #32d296;       /* Green for positive */
    --text-warning: #faa05a;       /* Orange for warnings */
    --text-danger: #f0506e;        /* Red/pink for errors */

    /* Tags/labels */
    --tag-bg: #E5BC70;
    --tag-hover: #e1b25a;
    --tag-text: #111111;           /* Dark text on yellow */
}

body {
	margin: 0;
	font-family: "Goldman", sans-serif;
	font-size: 12px;
	background-color: var(--bg-color);
	color: var(--text-color);
	transition: background-color 0.3s, color 0.3s;
}

body, input, select, button, textarea {
	font-family: "Goldman", sans-serif;	
	font-size: 14px;
}

.theme-switcher {
	position: fixed;
	top: 0.4rem;
	right: 0.4rem;
	z-index: 1000;
}

.theme-switcher select {
	padding: 4px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

select.icon-menu option {
background-repeat:no-repeat;
background-position:bottom left;
padding-left:30px;
}

select#theme-select option[value="happyhardcore"] {
	background-image:url(https://happyhardcore.uk/serve/img/HH.png);
}

#caps {
	color: var(--text-danger);
}

a {
    color: var(--primary-bg);
    text-decoration: unset;
}
a:hover {
    color: var(--primary-hover);
}

h1 {
	font-family: "Goldman", sans-serif;
	font-size: 30px;	
    margin: 0 0 .5em;
}
h2 {
	font-family: "Goldman", sans-serif;
	font-size: 20px;	
    margin: 0 0 .5em;
}

/* Scroll */

#scroll-buttons {
    position: fixed;
    right: 15px;
    bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9999;
}

#scroll-buttons button {
    background: color-mix(in srgb, var(--primary-bg) 70%, transparent);
    color: #fff;
    border: none;
    border-radius: 1rem; /* matches your 2xl rounded style */
    width: 40px;
    height: 40px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.25);
    transition: background 0.2s, opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
    opacity: 0;
    visibility: hidden;
}

#scroll-buttons button:hover {
    background: color-mix(in srgb, var(--primary-hover) 85%, transparent);
    opacity: 1;
    transform: translateY(-2px); /* subtle lift effect */
}

#scroll-buttons button.show {
    opacity: 0.85;
    visibility: visible;
}

/* Notifications */

/* Toastr custom styles */
#toast-container > .toast {
    font-family: 'Goldman', sans-serif;
    font-size: 14px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#toast-container > .toast-info {
    background-color: #3498db;
}

#toast-container > .toast-success {
    background-color: #2ecc71;
}

#toast-container > .toast-warning {
    background-color: #f1c40f;
}

#toast-container > .toast-error {
    background-color: #e74c3c;
}

/* Notification count badge */
.notification {
    background-color: #f0506e;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 8px;
}

/* Theme-specific styles */
.theme-dark #toast-container > .toast {
    background-image: none;
    color: white;
}

.theme-solarized #toast-container > .toast {
    background-image: none;
    color: #073642;
}

#notifications.tablesorter {
    width: 100%;
    border-collapse: collapse;
}

#notifications th, #notifications td {
    padding: 10px;
    border: 1px solid #ccc;
    text-align: left;
}

#notifications th {
    background-color: #f4f4f4;
    cursor: pointer;
}

/* Forms */

input, button, select, textarea {
	transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
input, button, textarea, select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}
.text {
    font-size: 1em;
    padding: .5em;
    border: .05em solid var(--card-border);
    border-radius: 0;
}
.text:focus {
    outline: #000;
    border-color: var(--card-border);;
}

/* Buttons */

button, button.submit, 
input.submit[type=button], 
input.submit[type=submit] {
    font: inherit;        /* inherit font size/line-height from parent */
    line-height: 1.5;     /* keeps vertical alignment consistent */
    box-sizing: border-box; /* makes width/height include padding/border */
}

input.submit, input.reset {
    height: 2.2em;
}
.submit {	
    color: var(--text-color);
    background-color: var(--primary-bg);
    border: .05em solid var(--card-border);
    border-radius: 0;
    width: 8em;
    /* height: 1.5em; */
    margin-top: .5em;
    padding: .3em;
    text-decoration: unset;
	
    /* 👇 added fixes */
    font: inherit;
    line-height: 1.5em;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;	
}
.submit:hover {
    cursor: pointer;
    color: var(--text-color);
    background-color: var(--primary-hover);
    border-color: var(--card-border);
}
.submit:active {
    cursor: pointer;
    background-color: var(--primary-bg);
    border-color: var(--card-border);
}
.reset {	
    color: var(--text-color);
    background-color: var(--secondary-bg);
    border: .05em solid var(--card-border);
    border-radius: 0;
    width: 8em;
    /* height: 1.5em; */
    margin-top: .5em;
    padding: .3em;
    text-decoration: unset;
	
    /* 👇 added fixes */
    font: inherit;
    line-height: 1.5em;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;	
}
.reset:hover {
    cursor: pointer;
    color: var(--text-color);
    background-color: var(--secondary-hover);
    border-color: var(--card-border);
}
.reset:active {
    cursor: pointer;
    background-color: var(--secondary-bg);
    border-color: var(--card-border);
}
.clear {	
    color: var(--tertiary-text);
    background-color: var(--tertiary-bg);
    border: .05em solid var(--card-border);
    border-radius: 0;
    width: 10em;
	/* height: 1.5em; */
    margin-top: .5em;
    padding: .3em;
    text-decoration: unset;
	
    /* 👇 added fixes */
    font: inherit;
    line-height: 1.5em;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;	
}
.clear:hover {
    cursor: pointer;
    color: var(--tertiary-text);
    background-color: var(--tertiary-hover);
    border-color: var(--card-border);
}
.clear:active {
    cursor: pointer;
    background-color: var(--tertiary-text);
    border-color: var(--card-border);
}
/* Styled Checkboxes */
.custom-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 1.8em;
    margin: 0.5em 0;
    cursor: pointer;
    font-size: 1em;
    user-select: none;
    color: var(--text-color);
}
.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.custom-checkbox .checkmark {
    position: absolute;
    left: 0;
    top: 0.1em;
    height: 1.2em;
    width: 1.2em;
    background-color: var(--card-border);
    border: 1px solid var(--text-color);
    transition: 0.2s;
}
.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--primary-bg);
    border-color: var(--primary-hover);
}
.custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}
.custom-checkbox .checkmark:after {
    left: 0.4em;
    top: 0.1em;
    width: 0.3em;
    height: 0.6em;
    border: solid var(--text-color);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Errors */

.good {
    /* color: var(--text-success); */
	color: var(--text-color);
}
.bad {
    /* color: var(--text-danger); */
	color: var(--text-color);	
}
.warning {
    color: var(--text-warning);
}
.link {
    color: var(--text-link);
}
.notification {
    margin: 10px 0;
}

/* Navigation */

nav {
    position: fixed;
    top: 0;
    background-color: var(--card-color);
	z-index: 999;
}
ul {
    list-style-type: none;
    padding: 0;
    width: 75%;
    overflow: hidden;
}
li {
    float: left;
}
li a {
    display: block;
    padding: 1em 0.7em;
    text-decoration: none;
	color: var(--nav-text);
}
li a:hover {
    background-color: var(--nav-hover);
	color: var(--nav-text);
}
li a, tt {
    color: var(--nav-text);
}
nav {
    width: 100%;
}
img, ul {
    margin: 0 auto;
}
.nav li.icon {
    display: none;
}

/* Navigation */

/* Dropdown submenu styles */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;           /* Start at 50% from parent left */
  transform: translateX(-50%); /* Shift left by half its own width */
  background: var(--card-color);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  min-width: 160px;
  padding: 0;
  margin: 0;
  list-style: none;
  z-index: 1000;
}

.dropdown-menu li a {
  display: block;
  padding: 0.5em 1em;
  white-space: nowrap;
  color: var(--nav-text);
  text-decoration: none;
}

.dropdown-menu li a:hover {
  background-color: var(--nav-hover);
}

.dropdown:hover > .dropdown-menu {
  display: block;
  /* optionally add transition here */
}

/* Login/Register/Forgot_password/Reset_Password */

.checkbox-row {
	display: flex;
	gap: 8px; /* space between checkboxes */
	align-items: center; /* vertical alignment */
}

form.login {
    display: grid;
    color: var(--text-color);
    background-color: var(--card-color);
    width: 25%;
    margin: 1em auto;
    border-radius: .5em;
    border: .05em solid var(--card-border);
    padding: 2em;
}

.loginbox, .text, textarea {
    width: 100%;
    margin-bottom: .5em;
    box-sizing: border-box;
}

/* Index */

.statbar {
	padding: .5em;
    padding-left: 1.8em;
	padding-right: 1.8em;
    background: var(--card-bg);
	border-radius: .3em;
    border: 1px solid var(--card-border);
    margin: 1.5em auto 0;
    font-size: 1rem;
	width: 70%;
}

.statbar > div {
    white-space: nowrap;        /* prevents content from breaking */
    flex: 0 1 auto;              /* grow only if needed */
    min-width: fit-content;
}

@media (max-width: 768px) {
    .statbar {
        flex-direction: column;
        align-items: flex-start;
		padding: 2em;
    }

    .statbar > div {
        width: 100%;
    }
}

.shout-message {
  margin-bottom: 0.5em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.shoutbox-messages img {
  max-width: 100%;
  height: auto;
  border-radius: 4px; /* optional, looks cleaner */
}

.shout-message a img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

#torrents {
    margin: 1em auto 0;
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    text-align: left;
}
#torrents th {
	font-weight: 400;
	background-color: var(--bg-color);
    color: var(--text-color);
    border: .1em solid var(--card-border);
}
#torrents tr:nth-child(odd) td,
#torrents tr:nth-child(even) td {
    background-color: var(--card-color);
	color: var(--text-color);
	border: .1em solid var(--card-border);
}
#torrents tr:hover td {
    background-color: var(--bg-color);
    color: var(--text-color);
}
#torrents td, th {
    margin: 0;
    padding: .5em;
    color: var(--text-color);
}
.table {
	overflow-x: visible !important;
	position: relative;
	z-index: 1;
}
.center, .submit {
    text-align: center;
}

/* === Torrent Image Hover Preview === */

.torrent-thumb {
  position: relative;
  display: inline-block;
}

.torrent-thumb img {
  width: 40px;
  height: auto;
  border-radius: 6px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: zoom-in;
}

/* Popup effect on hover */
.torrent-thumb:hover img {
  position: relative;
  z-index: 9999;
  transform: scale(3); /* how much bigger to make it */
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

/* === Fix: prevent image hover zoom clipping === */
.info,
section,
body,
html,
main,
table,
tbody,
tr,
td {
  overflow: visible !important;
}

/* Browse */

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5em;
    padding: 0.5em 0;
}
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-weight: normal;
}
.custom-checkbox input[type="checkbox"] {
    transform: scale(1.2);
}

.tag{
	font-size: 8px;
	border: 1px solid var(--card-border);
	background-color: var(--tag-bg);
	color: var(--tag-text);
	border-radius: 5px;
	padding: 5px;
	transition: all 300ms ease-in-out;
}
.tag:hover {
	border: 1px solid var(--card-border);
    background: var(--tag-hover);
	color: var(--tag-text);
    margin-left: 0.5em;
}

.tag.new {
	border: 1px solid var(--card-border);
    background: var(--tertiary-bg);
    color: var(--tertiary-text);
    margin-right: 0.5em;
	vertical-align: sub;
}
.tag.new:hover {
	border: 1px solid var(--card-border);
    background: var(--tertiary-hover);
    color: var(--tertiary-text);
    margin-right: 0.5em;
	vertical-align: sub;
}

.hidden {
    display: none !important;
}

/* Invitations/Profile/Edit_Profile */

.info {
    color: var(--text-color);
    background-color: var(--card-color);
    width: 70%;
    margin: 2em auto 0;
    border-radius: .3em;
    border: .1em solid var(--card-border);
    padding: 2em;
}

/* Upload */

select, input.text {
    min-height: 2em;
    resize: vertical;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--card-border);
    font-family: inherit;
    transition: background-color 0.3s, color 0.3s;
}

textarea.text {
    min-height: 8em;
    resize: vertical;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--card-border);
    font-family: inherit;
    transition: background-color 0.3s, color 0.3s;
}

.comment-card {
    background-color: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.comments textarea {
    width: 100%;
    max-width: 600px;
    padding: 0.5em;
    border-radius: 8px;
    border: 1px solid #ccc;
}
.comments input.submit {
    margin-top: 0.5em;
}

/* messages */

.tabs {
    margin-bottom: 15px;
}

.tab-button {
    padding: 8px 16px;
    cursor: pointer;
    background: #eee;
    border: 1px solid #ccc;
    border-bottom: none;
    font-weight: bold;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
}

.tab-button.active {
    background: #fff;
    border-bottom: 1px solid #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* memberlist */

img {
	filter: none !important;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5em;
}

.member-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1em;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s ease;
}

.member-card:hover {
    transform: translateY(-4px);
}

.member-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.member-avatar {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #ccc;
}

.meta {
    font-size: 0.85em;
    color: #888;
    margin-top: 0.25em;
}

/* Friends */

.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.friend-card {
    text-align: center;
}

.friend-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ccc;
}

.friend-card span {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
    font-weight: bold;
}

/* Other */

hr {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
}

table {
	width: 100%;
}

.comment {
    margin-bottom: 1.5em;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1em;
    border-radius: 6px;
}

.left {
    float: left;
}

.right {
    float: right;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* always 3 columns */
  column-gap: 10px;  /* space between columns */
  row-gap: 10px;  /* only space between rows */
}

.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1; /* keeps them square */
  object-fit: cover;   /* crops without distortion */
  display: block;      /* prevents inline <img> whitespace */
}

.pagination a, .pagination span {
    display: inline-block;
    margin: 0 4px;
    padding: 4px 8px;
    border: 1px solid var(--card-border);
    border-radius: 4px;
    text-decoration: none;
}
.pagination a:hover, .pagination span:hover {
    background: var(--nav-hover);
}
.pagination .dots {
    border: none;
    background: none;
    padding: 4px 6px;
}
.pagination .active-page, .pagination .current {
	border: 1px solid var(--card-border);
    background: var(--text-color);
    color: var(--bg-color);
    font-weight: bold;
}
.pagination .active-page:hover, .pagination .current:hover {
    background: var(--text-color);	
}
.pagination .disabled {
    color: #999;
    border: 1px solid var(--card-border);
    background: #f9f9f9;
    cursor: not-allowed;
}
.pagination select {
    margin-left:5px;
    padding:4px 6px;
    border-radius:4px;
    border:1px solid var(--card-border);
}

@media screen and (max-width: 1024px) {
	.theme-switcher {
		position: fixed;
		top: 0.4rem;
		right: 3rem;
		z-index: 1000;
	}	
    .info, .submit, .reset, form.login {
        box-sizing: border-box;
    }
    ul {
        width: 100%;
    }
    #torrents, .info, form.login {
        width: 90%;
        margin-bottom: 0;
    }
	.statbar {
		width: 85%;
	}
    .submit, .reset {
        display: block;
        width: 100%;
    }
    .right {
        float: left;
    }
    .nav li a {
        display: none;
    }
    .nav li.icon, .nav li.icon a {
        float: right;
        display: block;
    }
    .nav.responsive li {
        position: relative;
    }
    .nav.responsive li.icon, .nav.responsive li.icon a {
        position: absolute;
        right: 0;
        top: 0;
    }
    .nav.responsive li, .nav.responsive li a {
        float: none;
        display: block;
        text-align: left;
    }
}