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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    padding: 20px;
}

body.api-mode {
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

body.api-mode .container {
    background: transparent;
    padding: 0;
    box-shadow: none;
    max-width: none;
}

body.api-mode #qrcode {
    margin: 0;
}

body.api-mode .documentation {
    display: none !important;
}

body.api-mode .try-section {
    display: none !important;
}

body.api-mode h1 {
    display: none !important;
}

.container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 900px;
    width: 100%;
    text-align: center;
    margin: 0 auto;
}

h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

.try-section {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 30px;
    border: none;
}

.try-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    text-align: center;
}

.try-section h3 i,
.documentation h3 i,
.documentation h4 i {
    margin-right: 8px;
    color: #4a90e2;
}

.input-group {
    margin-bottom: 15px;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #4a90e2;
}

button {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
    background: #357abd;
}

button:active {
    transform: translateY(0);
}

#tryResult {
    margin-top: 30px;
    padding: 20px;
    background: transparent;
    border-radius: 0;
    display: none;
    text-align: center;
    box-shadow: none;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#tryResult.show {
    display: block;
}

#tryResult code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #d63384;
    font-size: 13px;
    word-break: break-all;
}

.documentation {
    margin-top: 40px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    text-align: left;
    border: none;
}

.documentation h3 {
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
    text-align: center;
}

.documentation h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.documentation p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

.documentation code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #e74c3c;
    font-size: 13px;
}

.doc-section {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-left: 3px solid #4a90e2;
}

.code-block {
    background: #f8f9fa;
    color: #333;
    padding: 12px 15px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    overflow-x: auto;
    border: 1px solid #e0e0e0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

table td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

table td:first-child {
    width: 80px;
}

table code {
    background: #f8f9fa;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #4a90e2;
    font-size: 13px;
}

.required {
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.optional {
    background: #6c757d;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab-btn {
    background: white;
    color: #4a90e2;
    border: 2px solid #e0e0e0;
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #f8f9fa;
    transform: none;
    box-shadow: none;
}

.tab-btn.active {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content pre {
    background: #f8f9fa;
    color: #333;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
    border: 1px solid #e0e0e0;
}

.examples {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.examples p {
    margin: 8px 0;
    font-size: 14px;
}

.examples p i {
    color: #4a90e2;
    margin-right: 8px;
    font-size: 12px;
}

.examples a {
    color: #4a90e2;
    text-decoration: none;
    word-break: break-all;
}

.examples a:hover {
    text-decoration: underline;
}

.documentation ul {
    margin: 10px 0 10px 20px;
    color: #555;
}

.documentation ul li {
    margin: 8px 0;
    line-height: 1.6;
}

.footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
}

.footer p {
    color: #666;
    font-size: 14px;
}

.footer p i {
    margin-right: 5px;
}

.footer a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    text-decoration: underline;
}

#qrcode {
    margin: 30px auto;
    display: inline-block;
}

#qrcode canvas,
#qrcode img {
    border-radius: 0;
    box-shadow: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
        max-width: 100%;
    }

    h1 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .try-section {
        padding: 15px;
    }

    .try-section h3 {
        font-size: 18px;
    }

    .documentation {
        padding: 0;
        margin-top: 30px;
    }

    .documentation h3 {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .documentation h4 {
        font-size: 14px;
    }

    .doc-section {
        padding: 15px;
        margin-bottom: 20px;
    }

    .tab-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tab-btn {
        padding: 6px 15px;
        font-size: 13px;
    }

    .tab-content pre {
        font-size: 11px;
        padding: 10px;
    }

    .code-block {
        font-size: 12px;
        padding: 10px;
    }

    table {
        font-size: 13px;
    }

    table td {
        padding: 8px 5px;
    }

    table td:first-child {
        width: 60px;
    }

    .examples {
        padding: 10px;
    }

    .examples p {
        font-size: 12px;
    }

    button {
        width: 100%;
        padding: 12px;
    }

    input[type="text"],
    input[type="number"] {
        font-size: 14px;
    }

    #qrcode canvas,
    #qrcode img {
        max-width: 100%;
        height: auto !important;
        width: auto !important;
    }

    #tryResult {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 20px;
    }

    .try-section h3,
    .documentation h3 {
        font-size: 16px;
    }

    .tab-content pre {
        font-size: 10px;
    }

    .code-block {
        font-size: 11px;
    }

    table {
        font-size: 12px;
    }

    table td {
        display: block;
        width: 100% !important;
        border-bottom: none;
        padding: 5px;
    }

    table tr {
        display: block;
        margin-bottom: 15px;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 10px;
    }
}
