* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    transition: 0.25s;
}

:root {
    --main-width: 1054px;
    --cell-size: 10px;
    --cell-border: 0.5px solid rgba(83, 70, 52, 0.1);
}

body {
    position: relative;
    min-height: 100vh;
    background-color: #1a1a1a;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: bottom;
    background-attachment: fixed;
}

::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 115, 85, 0.6);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 115, 85, 0.8);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 115, 85, 0.6) rgba(0, 0, 0, 0.1);
}

.unicorn-index {
    position: fixed;
    z-index: -1;
    width: 100vw !important;
    height: 100vh !important;
}

.container {
    max-width: var(--main-width);
    margin: 0 auto;
    position: relative;
}

.btn-group {
    z-index: 100;
    position: absolute;
    top: 50%;
    left: 0.6rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.gitee-fork-btn {
    width: 65px;
    height: 18px;
    cursor: pointer;
}

.header {
    max-width: var(--main-width);
    z-index: 12;
    margin: 0 auto;
    position: relative;
    background: linear-gradient(to bottom, #686872 0%, #3a3a42 100%);
    background-image: url("../images/header-bg.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    border: 2px solid #5a5a62;
    border-bottom: none;
    padding: 20px 24px;
    overflow: hidden;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 12;
    padding-left: 4px;
}

.header-left {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: -8px;
    cursor: pointer;
}

.site-logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s;
}

.site-title-image {
    width: 215px;
    height: 60px;
    display: block;
    transition: transform 0.2s;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

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

.header-slogan {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255);
    font-size: 17px;
    font-family: "阿里妈妈东方大楷 Regular", serif;
    letter-spacing: 0;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(47, 47, 47, 0.6);
}

.header-slogan span{
    text-shadow: 0 2px 4px rgba(0, 0, 0, 1);
}

@font-face {
    font-family: "阿里妈妈东方大楷 Regular";font-weight: 400;src: url("//at.alicdn.com/wf/webfont/ODMzelsm0rc2/0gj1jIIH2rN5.woff2") format("woff2"),
url("//at.alicdn.com/wf/webfont/ODMzelsm0rc2/tV1GaoR2FMAe.woff") format("woff");font-variation-settings: normal;font-display: swap;
}

.webfont {font-family: "阿里妈妈东方大楷 Regular";font-variation-settings: normal;}

.slogan-dot {
    color: rgba(255, 221, 0, 0.8);
    font-weight: 700;
    font-size: 2rem;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.header-right {
    cursor: pointer;
    display: flex;
    justify-content: right;
    margin-right: 40px;
    opacity: 0.9;
    padding: 10px 5px;
    border-radius: 11px;
    opacity: 0.85;
}

.header-right:hover {
    transition: 0.8s ease-out;
    transform: scale(1.03);
    opacity: 1;
}

.header h1,
.site-title {
    font-size: 1.8em;
    font-weight: 900;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    line-height: 1.2;
}

.site-title .title-text {
    display: block;
    font-size: 0.98em;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.08em;
    text-transform: none;
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.8),
        0 2px 6px rgba(0, 0, 0, 0.6),
        0 0 8px rgba(0, 0, 0, 0.5);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.site-title .title-domain {
    display: block;
    font-size: 0.37em;
    font-weight: 400;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 3px;
    text-transform: lowercase;
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.7),
        0 2px 4px rgba(0, 0, 0, 0.5);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.stats-info {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-item {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 13px;
}

.stat-label {
    color: #ffffff;
    font-weight: 500;
}

.stat-value {
    display: inline-block;
    min-width: 50px;
    font-weight: 700;
    font-size: 14px;
    color: #ffffff;
}

.stat-unit {
    font-size: 11px;
    color: #ffffff;
    font-weight: 600;
}

.tv-image {
    position: absolute;
    bottom: 0;
    right: 24px;
    width: 170px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info #user-name {
    color: #5c4a37;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0.5px 0.5px 1px rgba(255, 248, 220, 0.4);
}

.nav-link {
    color: #5c4a37;
    text-decoration: none;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    background: transparent;
    border-radius: 3px;
    text-shadow: 0.5px 0.5px 1px rgba(255, 248, 220, 0.4);
}

.nav-link:hover {
    background: rgba(139, 115, 85, 0.2);
    color: #8b4513;
    text-shadow: 1px 1px 2px rgba(255, 248, 220, 0.6);
    box-shadow: inset 0 1px 2px rgba(255, 248, 220, 0.3);
}

.nav-link-primary {
    background: #000000;
    color: #ffffff;
    font-weight: 500;
}

.nav-link-primary:hover {
    background: #333333;
}

.main-nav {
    position: relative;
    max-width: calc(var(--main-width) + 17px);   
    margin: 0 auto;
    background-image: url("../images/header.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top;
    z-index: 10;
    border-radius: 7px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.7),0 -2px 4px rgba(0, 0, 0, 0.7),
    inset 0 2px 4px rgba(0, 0, 0, 0.2),inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.nav-content {
    max-width: 1004px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 5px 0;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.nav-item {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    padding: 1px 2px;
    white-space: nowrap;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.4),2px 2px 0 #333;
    border-radius: 5px;
}

#username-display {
    color: #8b4513;
    font-weight: 600;
    text-shadow: 0.5px 0.5px 1px rgba(255, 248, 220, 0.6);
    padding: 4px 8px;
    font-size: 13px;
}

.status-published {
    color: #000 !important;
    font-weight: bold;
}

.status-paid {
    color: #0a5f98 !important;
    font-weight: bold;
}

.status-unpaid {
    color: #db3d31 !important;
    font-weight: bold;
}

.order-no {
    text-decoration: none !important;
}

.order-no:hover {
    color: #000000;
}

[role="tablist"] {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ccc;
}

[role="tablist"] button {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #f0f0f0;
    cursor: pointer;
}

[role="tablist"] button[aria-selected="true"] {
    background: #fff;
    border-bottom: 1px solid #fff;
    font-weight: bold;
}

.preview-section {
    margin-bottom: 16px;
}

.section-title {
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: bold;
}

.image-preview-container {
    padding: 16px;
    background: #fff;
    border: 1px solid #ccc;
    text-align: center;
}

.image-preview {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #ccc;
    margin-bottom: 12px;
}

.image-preview img {
}

.preview-info {
    margin-top: 12px;
    font-size: 14px;
    color: #666;
}

.share-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.share-card-preview {
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    padding: 10px;
    background-color: #ffffff;
}

.share-actions {
    display: flex;
    gap: 10px;
}

.share-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.share-card-preview {
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    padding: 10px;
    background-color: #ffffff;
}

.share-actions {
    display: flex;
    gap: 10px;
}

#my-pixels-list {
    max-height: none;
    overflow-y: visible;
    padding: 10px;
}

#my-pixels-modal .window {
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#my-pixels-modal .window-body {
    overflow-y: auto;
    flex: 1;
    max-height: 70vh;
}

#my-pixels-modal {
    background-color: rgba(0, 0, 0, 0.7); 
}

#my-pixels-modal .modal-content {
    background: #f4f4f4 !important;
    border: 1px solid #ccc !important;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.2) !important;
    max-width: 800px !important;
    border-radius: 0 !important;
    margin: 5% auto !important;
    padding: 20px 24px !important;
    width: 90% !important;
}

#my-pixels-modal .modal-content h2 {
    font-family: Arial, sans-serif;
    color: #333;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 8px;
}

#my-pixels-modal .my-pixels-list {
    /* background-color: #fff; */
    /* border: 1px solid #ddd; */
    /* margin-bottom: 10px; */
    border-radius: 0;
}

#my-pixels-modal .close {
    color: #666;
    right: 16px;
    top: 12px;
}

#my-pixels-modal .close:hover {
    color: #333;
}

.pixel-item {
    display: flex;
    margin-bottom: 15px;
    padding: 12px;
    background-color: #f4f4f4;
    border: 1px solid #ccc;
    font-family: Arial, sans-serif;
    position: relative;
    border-radius: 0;
}

.pixel-preview {
    width: 80px;
    height: 80px;
    margin-right: 12px;
    border: 1px solid #aaa;
    background-color: #fff;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);
}

.pixel-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

.pixel-details {
    flex: 1;
    min-width: 0;
}

.pixel-details h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    text-decoration: underline;
    text-decoration-color: #999;
    text-decoration-thickness: 1px;
}

.pixel-info-row {
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.4;
    display: flex;
}

.pixel-info-row:last-child {
    margin-bottom: 8px;
}

.info-label {
    display: inline-block;
    width: 70px;
    font-weight: bold;
    color: #666;
    text-align: left;
    margin-right: 8px;
    flex-shrink: 0;
}

.info-value {
    color: #333;
    word-break: break-all;
}

.info-link {
    color: #0066cc;
    cursor: pointer;
    margin-left: 8px;
    text-decoration: none;
}

.info-link:hover {
    text-decoration: underline;
}

/* 状态标签 */
.status-published {
    color: #2d5016;
    font-weight: bold;
}

.status-paid {
    color: #504716;
    font-weight: bold;
}

.status-unpaid {
    color: #501616;
    font-weight: bold;
}

/* 倒计时 */
.countdown-row {
    color: #501616;
}

/* 卡片操作区域 */
.pixel-actions {
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
    gap: 4px;
}

.no-data {
    text-align: center;
    padding: 50px 0;
}

.field-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.field-row label {
    width: 100px;
    margin-right: 10px;
    text-align: right;
    padding-top: 8px;
    flex-shrink: 0;
    
}

.field-row input {
    flex: 1;
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

.field-row .selection-info {
    flex: 1;
    padding: 8px;
    background: #fff;
    border: 1px solid #ccc;
}

.nav-separator {
    color: #fff;
    font-size: 13px;
    padding: 0 5px;
    user-select: none;
    font-weight: 600;
    text-shadow: 1px 1px 0 #000;
}

.center-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding-top: 15px;
    background-image: url('../images/bg.png');
    background-repeat: no-repeat;
    background-size: 100%;
    background-position: top center;
}

.grid-container {
    position: relative;
    z-index: 1;
    min-height: 600px;
}

.pixel-grid {
    position: relative;
    width: 1000px;
    height: 1000px;
    cursor: crosshair;
}

.pixel-cell {
    position: absolute;
    width: var(--cell-size);
    height: var(--cell-size);
    border: var(--cell-border);
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.pixel-cell.occupied {
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: #f4f4f4;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
    margin: 5% auto;
    padding: 20px 24px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideDown 0.3s;
    border-radius: 0;
    font-family: Arial, sans-serif;
}

#purchase-modal .window {
    width: 90%;
    max-width: 600px;
    margin: 5% auto;
}

#my-pixels-modal .window {
    width: 95%;
    max-width: 800px;
    margin: 5% auto;
    max-height: 80vh;
    overflow: hidden;
}

#my-pixels-modal .window-body {
    max-height: calc(80vh - 40px);
    overflow-y: auto;
}

#share-modal .window {
    width: 90%;
    max-width: 550px;
    margin: 5% auto;
}

#logout-confirm-modal .window {
    width: 90%;
    max-width: 400px;
    margin: 10% auto;
}

#edit-pixel-modal .window {
    position: fixed;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    margin: 0;
}

#alert-modal .window {
    width: 90%;
    max-width: 450px;
    margin: 10% auto;
}

#confirm-modal .window {
    width: 90%;
    max-width: 450px;
    margin: 10% auto;
}

#share-modal .window {
    width: 90%;
    max-width: 550px;
    margin: 5% auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #666;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 16px;
    top: 12px;
    line-height: 1;
    transition: color 0.2s;
}

.close:hover {
    color: #333;
    transition: 0s;
}

.modal-content h2 {
    margin-bottom: 16px;
    color: #333;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 1px solid #ccc;
    padding-bottom: 8px;
    font-family: Arial, sans-serif;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
    color: #333;
    font-size: 13px;
    font-family: Arial, sans-serif;
}

.form-group input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    background: #fff;
    font-size: 13px;
    color: #333;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    border-radius: 0;
}

.form-group input:focus {
    outline: none;
    border-color: #999;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.form-group small {
    color: #666;
    font-size: 11px;
    display: block;
    margin-top: 4px;
    font-family: Arial, sans-serif;
}

.selection-info {
    background: #fff;
    padding: 8px 10px;
    border: 1px solid #ccc;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #333;
    gap: 12px;
    font-family: Arial, sans-serif;
    border-radius: 0;
}

.price-info {
    background: #fff;
    border: 1px solid #ccc;
    color: #333;
    padding: 10px 14px;
    text-align: center;
    margin: 14px 0;
    font-size: 16px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    border-radius: 0;
}

.price-info strong {
    color: #333;
    font-weight: bold;
}

.tooltip {
    position: absolute;
    background: #ffffff; 
    color: #333333;
    padding: 4px 8px;
    border: 1px solid #dddddd;
    pointer-events: none;
    z-index: 10001;
    display: none;
    max-width: 300px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0;
    border-radius: 2px;
}

.tooltip.show {
    display: block;
}

.tooltip h4 {
    margin: 0;
    font-size: 12px;
    color: #333333; 
    font-weight: bold;
    letter-spacing: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.tooltip p {
    margin: 3px 0;
    font-size: 11px;
    color: #b4c4b4; 
}

.tooltip strong {
    color: #9fb99f; 
    font-weight: 600;
}

.tooltip-coord {
    color: #d4c4a4; 
}

.tooltip-link {
    color: #a4b4c4; 
    text-decoration: underline;
    display: inline-block;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.tooltip-action {
    color: #c4b494; 
    font-style: italic;
}

.tooltip-size {
    color: #d4c4a4; 
}

.tooltip-price {
    color: #e4d4b4; 
    font-weight: 600;
}

.tooltip-owner {
    color: #b4c4a4; 
    font-weight: 500;
}

.my-pixels-list {
    max-height: 500px;
    overflow-y: auto;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.purchase-notes {
    margin: 15px 0; 
    padding: 10px; 
    background-color: #f5f5f5; 
    border: 1px solid #ddd; 
    border-radius: 2px; 
    font-family: "Pixelated MS Sans Serif",serif;
    font-size: 12px; color: #555;
}

.purchase-notes P{
    font-family: "Pixelated MS Sans Serif",serif;
    margin: 5px 0;
    padding-left: 10px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: inline-block;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(60, 60, 68, 0.98);
    border: 1px solid rgba(90, 90, 98, 0.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 120px;
    margin-top: 0;
    padding: 4px 0;
}

.dropdown-item {
    display: block;
    padding: 8px 12px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: rgba(80, 80, 88, 0.9);
}