:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --border-color: #30363d;
    --primary-color: #88ff61;
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(48, 54, 61, 0.2) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(48, 54, 61, 0.2) 1px, transparent 1px);
    background-size: 24px 24px;
    z-index: -1;
}

.top-nav {
    width: 100%;
    max-width: 600px;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.menu-icon {
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-main);
    padding: 5px;
}

.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-speed);
    z-index: 99;
}

.side-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background-color: var(--card-bg);
    border-left: 1px solid var(--border-color);
    z-index: 100;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: right var(--transition-speed) ease;
}

.side-menu.active {
    right: 0;
}

.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.side-menu-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.close-icon {
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s;
    cursor: pointer;
}

.nav-links li a:hover, .nav-links li a.active-link {
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-links i {
    color: var(--text-muted);
    width: 20px;
}

.main-content {
    width: 100%;
    max-width: 600px;
    padding: 24px 20px 40px;
    display: flex;
    flex-direction: column;
}

.page-section {
    display: none;
    width: 100%;
}

.page-section.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-badge {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.uploader-header {
    text-align: center;
    margin-bottom: 28px;
}

.uploader-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: serif;
    font-style: italic;
}

.uploader-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
    max-width: 380px;
}

.file-uploader-section {
    width: 100%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.upload-box {
    width: 100%;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    padding: 32px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition-speed);
}

.upload-box:hover, .upload-box.drag-over {
    border-color: var(--primary-color);
    background: rgba(136, 255, 97, 0.02);
}

.upload-icon-circle {
    width: 56px;
    height: 56px;
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.upload-box h3 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.upload-box p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.btn-choose {
    width: 100%;
    background-color: var(--primary-color);
    color: #000;
    border: none;
    padding: 12px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
    text-align: center;
    transition: opacity 0.2s;
}

.btn-choose:hover {
    opacity: 0.9;
}

.file-list {
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
}

.file-item {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.remove-file {
    color: #ef4444;
    cursor: pointer;
}

.btn-upload {
    width: 100%;
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-upload:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.result-card {
    width: 100%;
    background-color: rgba(136, 255, 97, 0.05);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 12px;
    display: none;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
}

.result-url-input {
    width: 100%;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 10px;
    border-radius: 6px;
    font-family: monospace;
}

.api-header-section {
    width: 100%;
    text-align: left;
    margin-bottom: 24px;
}

.api-header-section h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.api-header-section p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.code-card {
    width: 100%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.code-card-header {
    background-color: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mac-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.code-card-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: monospace;
}

.btn-copy {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.code-card-body {
    padding: 16px;
}

.post-box {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}

.post-tag {
    color: var(--primary-color);
    font-weight: bold;
}

.post-url {
    color: var(--text-main);
}

pre[class*="language-"] {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    font-size: 0.82rem !important;
}

code[class*="language-"] {
    font-family: 'Consolas', 'Monaco', monospace !important;
}
