﻿/* Master Paste Premium v2.1 Refined */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #0b0f19;
    /* Deeper dark blue */
    --surface-color: #151b2b;
    /* Slightly lighter for cards */
    --surface-hover: #1e2538;
    --input-bg: #0f1422;
    /* Darker than surface for inputs */

    --primary-color: #f59e0b;
    --primary-gradient: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    --primary-glow: 0 0 15px rgba(245, 158, 11, 0.3);

    --text-color: #e2e8f0;
    --text-muted: #64748b;
    --border-color: #1e293b;

    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);

    --radius: 0.5rem;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s;
}

a:hover {
    color: #fbbf24;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1000px;
    /* Reduced max-width for better focus */
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main-content {
    flex: 1;
    padding: 3rem 0;
}

/* Header */
.site-header {
    background: rgba(11, 15, 25, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    text-shadow: 0px 2px 10px rgba(245, 158, 11, 0.2);
}

.main-nav ul {
    display: flex;
    gap: 1rem;
    list-style: none;
}

.main-nav a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.03);
}

.user-badge {
    background: var(--surface-color);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    font-weight: 600;
    display: inline-block;
}

/* Forms & Inputs */
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.5), inset 0 2px 4px rgba(0, 0, 0, 0.2);
    background: #111625;
}

/* Buttons */
button,
input[type="submit"],
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    /* Pill shape */
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.2);
    letter-spacing: 0.02em;
}

button:hover,
input[type="submit"]:hover,
.btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(245, 158, 11, 0.3);
    color: white;
    text-decoration: none;
}

button:active,
input[type="submit"]:active {
    transform: translateY(0);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    border-radius: var(--radius);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Cards */
.card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    /* More rounded */
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

/* Optional top accent for cards */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.5;
}

.card h3,
.card h1 {
    margin-top: 0;
    margin-bottom: 2rem;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.card h3::after,
.card h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1rem 0;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: rgba(255, 255, 255, 0.02);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-radius: var(--radius) var(--radius) 0 0;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

td a {
    color: var(--text-color);
    font-weight: 500;
}

td a:hover {
    color: var(--primary-color);
}

/* Custom Tabs */
.tabs {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    margin-bottom: 0;
    /* Attach to container */
    overflow-x: auto;
    border-bottom: none;
}

.tabs li {
    flex: 1;
    display: flex;
}

.tabs li div {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.tabs li.active div,
.tabs li div.active {
    /* Handle both JS cases */
    background: var(--surface-color);
    color: var(--primary-color);
    border-top: 2px solid var(--primary-color);
    border-bottom: 1px solid var(--surface-color);
    /* Blend with container */
    margin-bottom: -1px;
    z-index: 10;
}

.tabs li div:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.tab_container {
    background: transparent !important;
    /* Force removal of white bg */
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 5;
    box-shadow: none;
    /* Remove shadow to blend in */
    text-align: center;
    /* Force centering as requested */
}

/* Fix for "white" background and text visibility */
.tab_content {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.8;
    background: transparent !important;
    text-align: center;
    word-break: break-word;
    overflow-wrap: break-word;
    /* Ensure content is centered */
}

.tab_content pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    margin: 0;
}

/* Image Handling */
.tab_content img {
    max-width: 100%;
    width: auto;
    max-height: 400px;
    border-radius: var(--radius);
    margin: 1rem auto;
    display: inline-block;
    box-shadow: var(--shadow-md);
    vertical-align: middle;
}

@media (min-width: 768px) {
    .tab_content img {
        max-width: 500px;
    }
}

/* User mentioned large images were not like that. 
   Assuming they want a max-height or max-width restriction? 
   Let's set a reasonable max-width for content images but allow full responsiveness. 
   If they were thumbnails before (150px), maybe they mean general layout images.
*/

/* Search Bar Improvement */
.search-box {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 0.25rem 0.5rem 0.25rem 1.5rem;
    max-width: 500px;
    margin: 2rem auto;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.2s;
}

.search-box:focus-within {
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
    border-color: var(--primary-color);
}

.search-box input {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0.5rem;
    color: var(--text-color);
    flex: 1;
}

.search-box input:focus {
    outline: none;
    box-shadow: none;
}

.search-box button {
    padding: 0.6rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    margin: 0;
    box-shadow: none;
}

/* BBCode Editor Buttons */
#bbcodebutton {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: var(--radius);
}

#bbcodebutton button {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    background: var(--surface-hover);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    box-shadow: none;
    min-width: unset;
}

#bbcodebutton button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

#bbcodebutton .vipbbcodebuton {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
}

/* Textarea improvement */
textarea {
    min-height: 200px;
    font-family: 'Consolas', monospace;
    line-height: 1.5;
    background: #0d1117;
    border-color: var(--border-color);
    color: #c9d1d9;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.w-full {
    width: 100%;
}

.max-w-md {
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.max-w-lg {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Actions */
.actions a {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.03);
}

.actions a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.actions a.text-red-500 {
    color: #ef4444;
}

.actions a.text-red-500:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Footer */
.site-footer {
    background: rgba(11, 15, 25, 0.8);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 1rem 0;
        gap: 1rem;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .card {
        padding: 1.5rem;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tabs li {
        min-width: 100px;
    }

    th,
    td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .search-box {
        margin: 1rem;
    }
}