﻿h1 {
    text-align: center;
    margin-bottom: 30px;
}


details.response {
    background: white;
    //border-radius: 8px;
    margin-bottom: 28px; /* consistent spacing between sections */
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

summary {   
    list-style: none;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 12px;
    font-size: 18px;
}
details summary::-webkit-details-marker {
    display: none;
}
/* Add shuriken icon */
details summary::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;    
    background-image: url('data:image/svg+xml;utf8, <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <path fill="%23aaa" d="M50 0 L65 35 L100 50 L65 65 L50 100 L35 65 L0 50 L35 35 Z"/> <circle cx="50" cy="50" r="12" fill="%23000"/> </svg>');        
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
    /* This allows animation to restart */
    animation-duration: 0.6s;
    animation-fill-mode: none;
}

/* Force animation to restart on open/close */
details summary::before {
    animation: var(--throwAnim, none) 0.6s ease-out;
}

/* When OPEN → use wobbleThrow */
details[open] summary::before {
    --throwAnim: wobbleThrow;
}

/* When CLOSED → use wobbleThrow2 (identical animation, different name) */
details:not([open]) summary::before {
    --throwAnim: wobbleThrow2;
}
@keyframes wobbleThrow {
    0% {transform: rotate(0deg) scale(1);}
    20% { transform: rotate(90deg) scale(1.2); }
    40% { transform: rotate(180deg) scale(0.9); }
    60% { transform: rotate(270deg) scale(1.15);}
    80% { transform: rotate(330deg) scale(0.95); }
    100% { transform: rotate(360deg) scale(1);}
}

@keyframes wobbleThrow2 {
    0% {transform: rotate(0deg) scale(1);}
    20% {transform: rotate(90deg) scale(1.2);}
    40% {transform: rotate(180deg) scale(0.9);}
    60% {transform: rotate(270deg) scale(1.15);}
    80% {transform: rotate(330deg) scale(0.95);}
    100% {transform: rotate(360deg) scale(1);}
}

code {
    background: #eee;
    padding: 3px 6px;
    border-radius: 4px;
}

pre {
    background: #272822;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

details details {
    margin-left: 20px;
    border-left: 3px solid #ddd;
    padding-left: 15px;
}
/*- toc */
.toc {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 180px;
    background: #fff;
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

    .toc a {
        display: block;
        margin: 6px 0;
        color: #0078d4;
        text-decoration: none;
    }

        .toc a:hover {
            text-decoration: underline;
        }

.lang-switch {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    font-size: 14px;
}
.responseAPI {
    position: relative;
    margin-top: 16px;
    padding: 14px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 6px;
    display: none;
}
/*- spinner -*/
#spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 9999;
}

.loader {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}