/* MAIN */
:root {
	--err: #FF7272;
	--y: #00FF73;
	--n: #FF7272;
	--ddc1: #fff;
	--ddc2: #eaeaea;
	--ddc3: #eaeaea;
	--ddo1: #333;
	--ddo2: #555;
	--ddo3: #555;
}

body {
	margin: 0;
	padding: 20px;
	font-family: Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: #222;
	background-color: #f9f9f9;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	cursor: default;
}

.err {
	color: var(--err);
}

h1, h2, h3, h4, p {
	padding: 0;
	margin: 0;
}

/* Conf */

.emoji {
	height: 16px;
	width: 16px;
	vertical-align: middle;
}

.tab {
	text-align: left;
}

.sp {
	padding-right: 30px;
}

a {
	color: blue;
	text-decoration: underline;
	cursor: pointer;
}

a:hover {
	text-decoration: none;
	cursor: pointer;
}

a:active {
	color: black;
	text-decoration: underline;
	cursor: pointer;
}

img {
	cursor: pointer;
}

/* Badges */

.admin, .dev, .prem, .stg {
	padding: 4px;
	margin: 4px;
	font-weight: bold;
	border-radius: 6px;
	color: #000;
}

.admin {
	background-color: red;
	color: white;
}

.dev {
	background-color: aqua;
	color: black;
}

.prem {
	background: linear-gradient(to right, #ffd700, #ffa500);
	color: #222;
	box-shadow: 0 0 6px gold;
}

.stg {
	background-color: #B388EB;
	color: black;
	font-weight: bold;
}

/* dir:/index.php */

.toggle-header {
	cursor: pointer;
	user-select: none;
	font-weight: bold;
	margin-top: 1em;
}

.toggle-content {
	margin-bottom: 1em;
}

/* CLOSED */

.toggle-header {
		align-items: center;
		padding: 0.3rem 1.5rem;
		color: #333;
	background: var(--ddc1);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
		top: 0;
		z-index: 1000;
		border-bottom: 1px solid #eaeaea;
}

.toggle-header:hover {
	color: #333;
	background: var(--ddc2);
}

/*
.toggle-header:active {
	color: #333;
	background: var(--ddc3);
}
*/

/* OPEN */

.toggle-header.open {
	color: #fff;
	background: var(--ddo1);
}

.toggle-header.open:hover {
	color: #fff;
	background: var(--ddo2);
}

/*
.toggle-header.open:active {
	color: #333;
	background: var(--ddo3);
}
*/

/* dir:/u/index.php */

.profile img.avatarb {
	width: 160px;
	height: 160px;
	border-radius: 50%;
	object-fit: cover;
}

.garage, .profile {
	font-family: 'Segoe UI', Arial, sans-serif;
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

.garage h1, .profile h1 {
	color: #333;
	border-bottom: 2px solid #4285f4;
	padding-bottom: 10px;
	margin-bottom: 20px;
}

.vehicle-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
	margin-top: 20px;
}

.vehicle-card {
	background: white;
	border-radius: 10px;
	box-shadow: 0 4px 8px rgba(0,0,0,0.1);
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	padding: 15px;
}

.vehicle-image {
	width: 100%;
	height: 180px;
	object-fit: cover;
	border-radius: 8px;
	margin-bottom: 15px;
}

.vehicle-image.g {
	background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.vehicle-card h3 {
	color: #222;
	margin: 0 0 10px 0;
	font-size: 1.2rem;
}

.vehicle-card a {
	display: inline-block;
	margin-top: 15px;
	padding: 8px 15px;
	background-color: #4285f4;
	color: white;
	text-decoration: none;
	border-radius: 5px;
	font-weight: 500;
	transition: background-color 0.3s;
	width: 85%;
	text-align: center;
}

/* dir:/v/index.php */

.vehicle-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 8px;
}

.vehicle-container h1 {
    color: #222;
    margin-bottom: 5px;
    font-size: 2rem;
}

.vehicle-container h2 {
    color: #444;
    border-bottom: 2px solid #4285f4;
	padding-bottom: 8px;
    margin: 0px 0 15px;
	font-size: 1.5rem;
}

/* Gallery Styles */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery img:hover {
    transform: scale(1.02);
}

/* Specs Grid */
.specs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.spec-item {
    padding: 12px;
    background: #f5f5f5;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

/* Color Displays */
.colord {
    display: inline-block;
    padding: 3px 8px !important;
    border-radius: 4px;
    font-family: monospace;
    margin-top: 5px;
}

.color, .color2 {
    border: 1px solid rgba(0,0,0,0.1);
    color: white !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .specs {
        grid-template-columns: 1fr;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #777;
    font-size: 0.9rem;
}

/* dir:/t/index.php */

.thread-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    font-size: 0.95rem;
    color: #333;
    border-left: 4px solid #4285f4;
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

.post {
    background: white;
    border-radius: 4px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

.post:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.post-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eaeaea;
}

.user-meta {
    flex: 1;
}

.user-names {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.dn {
    font-weight: 600;
    color: #222;
}

.un {
    color: #555;
    font-size: 0.9rem;
}

.date {
    display: block;
    font-size: 0.85rem;
    color: #777;
    margin-top: 4px;
}

.post-content {
    margin: 12px 0;
    line-height: 1.5;
    font-size: 1rem;
    color: #222;
}

.post-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.post-images img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.post-images img:hover {
    transform: scale(1.05);
}

.reactions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.reaction-btn {
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    user-select: none;
    background: #f5f5f5;
    border: 1px solid #ddd;
}

.reaction-btn:hover {
    background: #e8e8e8;
    transform: translateY(-1px);
}

.reaction-btn.liked {
    background: #e6f4ea;
    color: #137333;
    border-color: #a5d6a7;
}

.reaction-btn.disliked {
    background: #fce8e6;
    color: #c5221f;
    border-color: #f28b82;
}

#scrollButtons {
    position: fixed;
    bottom: 256px; /* Über der Reply-Box, damit kein Überlappen */
    right: 20px;   /* Exakt wie #replyBox — innerhalb des body-Paddings */
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.scroll-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid #4285f4;
    color: #4285f4;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
	text-decoration: none;
}

.scroll-btn {
	text-decoration: none;
}

.scroll-btn:hover {
    background: #4285f4;
    color: white;
    transform: scale(1.1);
}

.backbtn .scroll-btn {
    background: #ff7272;
    border-color: #ff7272;
    color: white;
}

#replyBox {
    position: fixed;
    bottom: 20px;
    left: 20px; /* body-padding links */
    right: 20px; /* body-padding rechts */
    max-width: none; /* Keine künstliche Begrenzung */
    width: auto; /* Fließt natürlich zwischen left/right */
    background: white;
    border-radius: 10px;
    padding: 15px; /* identisch mit .post */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 999;
    box-sizing: border-box; /* WICHTIG: padding wird in die Breite einbezogen */
}

#replyBox:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

#replyContent {
    width: 100%;
    min-height: 60px;
    max-height: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    margin-bottom: 10px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#replyContent:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

#fileInput {
    display: none;
}

label[for="fileInput"] {
    display: inline-block;
    padding: 6px 12px;
    background: #f5f5f5;
    color: #555;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-bottom: 10px;
    border: 1px solid #ddd;
}

label[for="fileInput"]:hover {
    background: #e8e8e8;
}

#sendButton {
    padding: 8px 15px;
    background-color: #4285f4;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s;
    cursor: pointer;
    font-size: 0.95rem;
}

#sendButton:hover {
    background-color: #3367d6;
}

#formError {
    color: var(--err);
    margin-top: 10px;
    font-weight: 500;
    font-size: 0.9rem;
}

body {
    padding-bottom: 120px;
}

@media (max-width: 768px) {
    #replyBox {
        width: calc(100% - 30px);
        padding: 12px;
    }
    body {
        padding-bottom: 140px;
    }
}

@media (max-width: 768px) {
    .post-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .avatar {
        margin-bottom: 10px;
    }
    
    #scrollButtons {
        bottom: 80px;
        right: 10px;
    }
    
    #replyBox {
        margin: 20px 0;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    #replyBox {
        padding: 15px;
    }
}