* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: #1e293b;
    padding: 20px 0;
    border-bottom: 1px solid #334155;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
}

.logo h1 {
    font-size: 28px;
    color: #60a5fa;
}

.lang-switch select {
    padding: 6px 12px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.lang-switch select:hover {
    border-color: #60a5fa;
}

.lang-switch select:focus {
    outline: none;
    border-color: #60a5fa;
}


.main {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    padding: 30px 20px;
}

.sidebar {
    background: #1e293b;
    padding: 20px;
    border-radius: 12px;
    height: fit-content;
}

.nav-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: transparent;
    border: none;
    color: #94a3b8;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: #334155;
    color: #e2e8f0;
}

.nav-item.active {
    background: #3b82f6;
    color: white;
}

.content {
    background: #1e293b;
    padding: 30px;
    border-radius: 12px;
}

.tool-panel {
    display: none;
}

.tool-panel.active {
    display: block;
}

.tool-panel h2 {
    margin-bottom: 20px;
    color: #60a5fa;
}

.card {
    background: #0f172a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

input, textarea {
    width: 100%;
    padding: 12px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 14px;
    margin: 10px 0;
}

textarea {
    min-height: 150px;
    font-family: 'Courier New', monospace;
    resize: vertical;
}

button {
    padding: 10px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

button:hover {
    background: #2563eb;
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#json-result, #ts-result, #datetime-result, #encode-result {
    margin-top: 15px;
    padding: 15px;
    background: #1e293b;
    border-radius: 6px;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    min-height: 50px;
}

.copy-btn {
    position: absolute;
    top: 23px;
    right: 8px;
    padding: 4px 8px;
    background: #334155;
    font-size: 16px;
    min-width: auto;
    opacity: 0.7;
}

.copy-btn:hover {
    background: #3b82f6;
    opacity: 1;
}

#json-result:empty + .copy-btn {
    display: none;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #3b82f6;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.delete-btn {
    min-width: 16px;
    width: 16px;
    height: 16px;
    padding: 3px;
    background: #ef4444;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.delete-btn svg {
    color: white;
}

#api-response {
    background: #1e293b;
    border-radius: 6px;
    padding: 15px;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.cron-error {
    border-color: #ef4444 !important;
    background-color: #fee2e2 !important;
}

#qr-canvas {
    display: block;
    margin: 20px auto;
    background: white;
    padding: 10px;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .main {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: flex;
        overflow-x: auto;
        padding: 10px;
    }

    .nav-item {
        white-space: nowrap;
    }
}

.pb-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    transition: all 0.2s;
}

.pb-tab.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

.pb-mode {
    display: none;
}

.pb-mode.active {
    display: block;
}

.pb-tree {
    margin-top: 15px;
    padding: 15px;
    background: #0f172a;
    border-radius: 6px;
}

.pb-field {
    margin: 8px 0;
    padding: 8px;
    background: #1e293b;
    border-radius: 4px;
    border-left: 3px solid #3b82f6;
}

.pb-field select {
    margin-left: 10px;
    padding: 4px 8px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #e2e8f0;
    border-radius: 4px;
}

