:root {
    --background: white;
    --accent: #202020;
    
    /* Modern dark theme variables for item pages */
    --primary-color: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --dark-surface-light: #334155;
    --dark-border: #475569;
    --dark-text-primary: #f8fafc;
    --dark-text-secondary: #cbd5e1;
    --dark-text-muted: #94a3b8;
    --border-radius: 0.75rem;
    --box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: 14pt;
    font-family: "Segoe UI";
    text-decoration: none;
    background-color: var(--background);
    color: var(--accent);
    vertical-align: middle;
}

a {
    display: block;
    color: var(--accent);
}

a:hover {
    color: #333;
}

.bold {
    font-weight: bold;
}

.hidden {display: none}

p {margin: 0}

.fa {margin-right: 3px}

.inline {display: inline-block}

.submit {
    cursor: pointer;
    padding: 7.5px 10px;
    margin-top: 10px;
    margin-left: 30px;
    border: 2px solid #4caf50;
    background-color: transparent;
    color: #4caf50;
    display: inline-block;
    text-decoration: none;
    font-family: "Roboto Condensed";
    font-size: 18px;
}

.submit:first-of-type {
    margin-right: 30px;
}

/* Add seller/keyword/category pages */
input {
	border: 0;
    box-sizing: border-box;
    margin-bottom: 10px;
    padding: 10px;
    /* width: 60%; */
    background-color: #EFEFEF;
	font-family: "Roboto Condensed";
	font-size: 14pt;
    color: var(--accent);
    text-align: center;
    display: block;
}

ul {
    list-style: none;
    padding: 0
}

/* Older styles */
.main {
    display: block;
    border-bottom: 2px solid var(--accent);
    width: 100%;
}
.main:last-of-type {
    border-bottom: 0;
}

.title {
    font-size: 18pt;
    margin: 5px;
    text-decoration: none;
}

.subtitle {
    font-size: 16pt;
    text-align: center;
    margin-bottom: 5px;
}

/* Dropdown menu */
/* The container <div> - needed to position the dropdown content */
.dropdown {
    position: absolute;
    top: 0;
    animation: fadein 5s;
}

/* Style The Dropdown Button */
.dropbtn {
    color: var(--accent);
    padding: 24px;
    padding-bottom: 8px;
    font-size: 18pt;
    border: none;
    cursor: pointer;
}

/* Dropdown Content (Hidden by Default) */
.dropdown-content {
    position: absolute;
    margin-left: 18px;
    min-width: 170px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease-in-out;
}

/* Links inside the dropdown */
.dropdown-content a, .dropdown-content > label{
    border-bottom: 2px solid var(--accent);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    cursor: pointer;
}

.dropdown-content a:first-of-type {
    border-top: 2px solid var(--accent);
}

.content a:first-of-type {
    border-top: 0;
}

/* Change color of dropdown links on hover */
.dropdown-content a:hover {
    color: #565656;
    border-color: #565656
}

.toggle:checked + .label-toggle {
    background-color: transparent;
    color: var(--accent);
}

/* Change the background color of the dropdown button when the dropdown content is shown */
.dropdown:hover .dropbtn {
    color: #565656;
}

.content {
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease-in-out;
    font-family: "Roboto Condensed";
    font-size: 12pt;
    background-color: #EFEFEF;
}

/* Main */
.block {
    width: 100%;
    margin: 0 auto;
    padding: 5px;
}

/* Collapsible */
.lbl-toggle {
    transition: all 0.25s ease-out;
    cursor: pointer;
    font-family: "Segoe UI";
}
  
.lbl-toggle:hover {
    color: #565656;
}

.lbl-toggle::before {
    transform: translateY(-2px);
    transition: transform .2s ease-out;
}

.toggle:checked + .lbl-toggle {
    background-color: transparent;
    color: var(--accent);
}
  
.toggle:checked + .lbl-toggle::before {
    transform: rotate(90deg) translateX(-3px);
}
  
.collapsible-content {
    margin: auto;
    /* width: 30%; */
    max-height: 300vh;
    overflow: hidden;
    transition: max-height .5s ease-in-out;
}

.toggle:checked + .lbl-toggle + .collapsible-content, .toggle:checked + label + .dropdown-content, .toggle:checked + label + .content {
    max-height: 0;
}
  
.content-inner {
    font-family: "Roboto Condensed";
    font-size: 14pt;
    background-color: #EFEFEF;
    margin: 5px auto 10px;
    padding: 15px 20px 20px;
    width: 70%;
}

.content-inner > form {
    text-align: center;
    margin: 30px 0 10px
}

label > i {margin-right: 5px}

/* ========================================
   MODERN ITEM PAGES STYLES
   ======================================== */

/* Modern body styles for item pages */
body.modern-item-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
    color: var(--dark-text-primary);
}

/* Page header styles */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-text-primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    font-size: 1rem;
    color: var(--dark-text-secondary);
    margin-bottom: 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--dark-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    background: var(--dark-surface);
}

.back-link:hover {
    color: var(--dark-text-primary);
    background: var(--dark-surface-light);
}

.back-link i {
    margin-right: 0.5rem;
}

/* Category container styles */
.category-container {
    margin-bottom: 1.5rem;
    background: var(--dark-surface);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--dark-border);
    overflow: hidden;
}

.category-header {
    padding: 1rem 1.5rem;
    background: var(--dark-surface-light);
    border-bottom: 1px solid var(--dark-border);
    cursor: pointer;
    transition: var(--transition);
}

.category-header:hover {
    background: rgba(59, 130, 246, 0.1);
}

.category-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
}

.category-title i {
    margin-right: 0.75rem;
    transition: var(--transition);
}

.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.category-container.expanded .category-content {
    max-height: 2000px;
}

.category-container.expanded .category-title i {
    transform: rotate(180deg);
}

.items-grid {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.item-card {
    background: var(--dark-surface-light);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--dark-border);
    overflow: hidden;
    transition: var(--transition);
}

.item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

.item-header {
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.item-body {
    padding: 1rem;
}

.item-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.platform-section {
    background: var(--dark-surface);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    border: 1px solid var(--dark-border);
    display: flex;
    gap: 1rem;
}

.platform-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dark-text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.platform-title i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.item-image {
    width: 120px;
    height: 120px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.item-details {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-shrink: 1;
    align-items: center;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(71, 85, 105, 0.1);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(71, 85, 105, 0.1);
    min-height: 1.5rem;
    flex-wrap: wrap;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--dark-text-secondary);
    font-weight: 600;
    margin-right: 0.5rem;
}

.detail-value {
    font-size: 0.75rem;
    color: var(--dark-text-primary);
    font-weight: 600;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.price {
    font-size: 0.75rem;
    font-weight: 600;
}

.profit-price {
    color: var(--success-color);
}

.profit-price.unprofitable {
    color: var(--danger-color);
}

.item-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius);
    background: rgba(59, 130, 246, 0.1);
    transition: var(--transition);
    margin-top: 0.75rem;
}

.item-link:hover {
    background: var(--primary-color);
    color: white;
}

.item-link i {
    margin-right: 0.375rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    justify-content: center;
}

.btn {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn i {
    font-size: 0.75rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--success-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.75rem;
    gap: 0.5rem;
    width: auto;
}

.status-badge i {
    font-size: 1rem;
}

/* Responsive styles */
@media (max-width: 768px) {
    body.modern-item-page {
        padding: 0.5rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .item-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}