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

:root {
    --bg-primary: green;
    --bg-container: white;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --border-light: #f1f5f9;
    --shadow: 0 20px 40px rgba(0,0,0,0.1);
    --support-bg: #f8fafc;
    --stat-color: #2d3748;
    --heart-color: #e53e3e;
    --modal-overlay: rgba(0, 0, 0, 0.5);
    --card-bg: white;
}

[data-theme="dark"] {
    --bg-primary: #0a2f0a;
    --bg-container: #1a1a1a;
    --text-primary: #f7fafc;
    --text-secondary: #cbd5e0;
    --text-muted: #a0aec0;
    --border-color: #2d3748;
    --border-light: #2d3748;
    --shadow: 0 20px 40px rgba(0,0,0,0.3);
    --support-bg: #2d3748;
    --stat-color: #f7fafc;
    --heart-color: #fc8181;
    --modal-overlay: rgba(0, 0, 0, 0.7);
    --card-bg: #1a1a1a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.5s ease;
    padding: clamp(10px, 3vw, 20px);
}

.container {
    width: 100%;
    max-width: min(1400px, 95vw);
    position: relative;
}

.theme-toggle {
    position: absolute;
    top: clamp(12px, 2vw, 20px);
    right: clamp(12px, 2vw, 20px);
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid #22c55e;
    border-radius: 50px;
    cursor: pointer;
    z-index: 100;
    padding: 8px;
    transition: all 0.3s ease;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(34, 197, 94, 0.2);
    transform: scale(1.05);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(34, 197, 94, 0.15);
}

.theme-icon {
    font-size: 24px;
    transition: all 0.3s ease;
}

.theme-toggle .sun {
    display: block;
}

.theme-toggle .moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .moon {
    display: block;
}

.cards-row {
    display: flex;
    gap: clamp(15px, 2vw, 25px);
    margin-bottom: clamp(15px, 2vw, 25px);
    flex-direction: row;
}

.card {
    background: var(--card-bg);
    border-radius: clamp(10px, 1.5vw, 12px);
    padding: clamp(20px, 3vw, 30px);
    box-shadow: var(--shadow);
}

.left-card {
    flex: 2.5;
}

.right-card {
    flex: 1;
    min-width: min(320px, 100%);
}

.header-section {
    display: flex;
    align-items: center;
    gap: clamp(0.8rem, 2vw, 1.5rem);
    margin-bottom: clamp(1rem, 3vw, 2rem);
    flex-wrap: nowrap;
    text-align: left;
}

.logo {
    cursor: pointer;
    animation: crabWalk 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
    display: flex;
    align-items: center; 
    font-size: clamp(2rem, 8vw, 4rem);
    flex-shrink: 0;
}

.logo:hover {
    transform: scale(1.1) rotate(10deg);
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.15));
}

@keyframes crabWalk {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(5px) rotate(5deg); }
    50% { transform: translateX(10px) rotate(0deg); }
    75% { transform: translateX(5px) rotate(-5deg); }
}

.title-slogan {
    text-align: left;
    flex: 1;
    min-width: 0;
}

h1 {
    color: var(--text-primary);
    margin-bottom: clamp(0.3rem, 1vw, 0.5rem);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.slogan {
    color: var(--text-secondary);
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    font-weight: 500;
    letter-spacing: 0.2px;
    position: relative;
    display: inline-block;
    padding: clamp(0.3rem, 0.8vw, 0.4rem) clamp(0.6rem, 1.2vw, 0.8rem);
    border-radius: clamp(8px, 1vw, 10px);
    background: linear-gradient(135deg, 
        rgba(34, 197, 94, 0.08) 0%, 
        rgba(59, 130, 246, 0.04) 100%);
    border: 1px solid rgba(34, 197, 94, 0.15);
    line-height: 1.3;
    margin-top: 0.3rem;
    max-width: 100%;
    overflow-wrap: break-word;
}

.slogan::before {
    content: "⚡";
    margin-right: 6px;
    animation: lightningFlash 2s ease-in-out infinite;
    display: inline-block;
    font-size: 0.9em;
}

@keyframes lightningFlash {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

h2 { 
    color: var(--text-primary); 
    margin: 0 0 clamp(10px, 2vw, 15px) 0;
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    display: flex;
    align-items: center;
    gap: clamp(8px, 1vw, 10px);
}

p { 
    margin: clamp(8px, 1.5vw, 12px) 0; 
    line-height: 1.6; 
    color: var(--text-secondary);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: clamp(10px, 2vw, 15px);
    margin: clamp(15px, 3vw, 20px) 0;
}

.feature {
    background: rgba(34, 197, 94, 0.08);
    padding: clamp(12px, 2vw, 15px);
    border-radius: clamp(8px, 1vw, 10px);
    border-left: 4px solid #22c55e;
    color: var(--text-secondary);
}

.feature strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: clamp(3px, 1vw, 5px);
    font-size: clamp(0.95rem, 1.2vw, 1rem);
}

.feature small {
    color: var(--text-secondary);
    font-size: clamp(0.8rem, 1vw, 0.9rem);
}

pre {
    background: #1a1a1a;
    color: #fff;
    padding: clamp(15px, 2vw, 20px);
    border-radius: clamp(8px, 1vw, 10px);
    overflow-x: auto;
    margin: clamp(15px, 2vw, 20px) 0;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    line-height: 1.4;
}

code {
    font-family: 'Courier New', monospace;
    font-size: inherit;
}

.stats {
    display: flex;
    justify-content: space-between;
    gap: clamp(0.5rem, 1.5vw, 1rem);
    margin: 0 0 clamp(1.5rem, 3vw, 2rem) 0;
    flex-wrap: wrap;
}

.stat-skeleton {
    text-align: center;
    flex: 1;
    min-width: min(70px, 100%);
}

.stat-number {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: bold;
    color: var(--stat-color);
    display: block;
    height: clamp(2rem, 4vw, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-label {
    font-size: clamp(0.75rem, 1vw, 0.85rem);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.3rem;
}

.skeleton {
    display: inline-block;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, #2d3748 25%, #374151 50%, #2d3748 75%);
    background-size: 200% 100%;
}

.skeleton-stat {
    width: clamp(50px, 8vw, 60px);
    height: clamp(28px, 4vw, 32px);
}

@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.support-box {
    background: var(--support-bg);
    border: 2px solid var(--border-color);
    border-radius: clamp(10px, 1.5vw, 12px);
    padding: clamp(1rem, 2vw, 1.5rem);
    margin: clamp(1rem, 2vw, 1.5rem) 0;
    text-align: left;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.5s ease;
}

.box-header {
    display: flex;
    align-items: center;
    gap: clamp(0.6rem, 1vw, 0.8rem);
    margin-bottom: clamp(1rem, 1.5vw, 1.2rem);
    padding-bottom: clamp(0.6rem, 1vw, 0.8rem);
    border-bottom: 2px solid #22c55e;
}

.box-icon {
    font-size: clamp(1.5rem, 2vw, 1.8rem);
}

.box-header h3 {
    color: var(--text-primary);
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    margin: 0;
}

.box-content {
    margin: clamp(0.8rem, 1.5vw, 1rem) 0;
}

.support-link {
    display: flex;
    align-items: center;
    gap: clamp(0.8rem, 1.5vw, 1rem);
    margin-bottom: clamp(0.8rem, 1.5vw, 1rem);
    padding: clamp(0.6rem, 1vw, 0.8rem);
    background: var(--card-bg);
    border-radius: clamp(6px, 1vw, 8px);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.support-link:hover {
    transform: translateX(5px);
    border-color: #22c55e;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
    background: rgba(34, 197, 94, 0.05);
}

.support-icon {
    font-size: clamp(1.3rem, 2vw, 1.5rem);
    width: clamp(40px, 6vw, 50px);
    height: clamp(40px, 6vw, 50px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: clamp(8px, 1.5vw, 10px);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.support-link:hover .support-icon {
    transform: scale(1.1);
}

.support-text {
    flex: 1;
    min-width: 0;
}

.support-text strong {
    color: var(--text-primary);
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    display: block;
    margin-bottom: 0.2rem;
}

.support-text span {
    color: var(--text-secondary);
    font-size: clamp(0.8rem, 1vw, 0.9rem);
    display: block;
}

.box-note {
    text-align: center;
    font-style: italic;
    color: var(--text-secondary);
    margin-top: clamp(0.8rem, 1.5vw, 1rem);
    padding-top: clamp(0.8rem, 1.5vw, 1rem);
    border-top: 1px dashed var(--border-color);
    font-size: clamp(0.85rem, 1vw, 1rem);
}

[data-theme="light"] [data-box-type="get-started"] .support-link:nth-child(1) .support-icon {
    background: #e8f4fd; color: #0ea5e9;
}
[data-theme="dark"] [data-box-type="get-started"] .support-link:nth-child(1) .support-icon {
    background: #1e3a8a; color: #7dd3fc;
}

[data-theme="light"] [data-box-type="get-started"] .support-link:nth-child(2) .support-icon {
    background: #f0fdf4; color: #22c55e;
}
[data-theme="dark"] [data-box-type="get-started"] .support-link:nth-child(2) .support-icon {
    background: #14532d; color: #4ade80;
}

[data-theme="light"] [data-box-type="get-started"] .support-link:nth-child(3) .support-icon {
    background: #fef7cd; color: #eab308;
}
[data-theme="dark"] [data-box-type="get-started"] .support-link:nth-child(3) .support-icon {
    background: #713f12; color: #fde047;
}

[data-theme="light"] [data-box-type="get-started"] .support-link:nth-child(4) .support-icon {
    background: #fae8ff; color: #c026d3;
}
[data-theme="dark"] [data-box-type="get-started"] .support-link:nth-child(4) .support-icon {
    background: #701a75; color: #f0abfc;
}



[data-theme="light"] [data-box-type="support"] .support-link:nth-child(1) .support-icon {
    background: #ffedd5; color: #ea580c;
}
[data-theme="dark"] [data-box-type="support"] .support-link:nth-child(1) .support-icon {
    background: #7c2d12; color: #fdba74;
}

[data-theme="light"] [data-box-type="support"] .support-link:nth-child(2) .support-icon {
    background: #e0e7ff; color: #4f46e5;
}
[data-theme="dark"] [data-box-type="support"] .support-link:nth-child(2) .support-icon {
    background: #312e81; color: #a5b4fc;
}

[data-theme="light"] [data-box-type="support"] .support-link:nth-child(3) .support-icon {
    background: #fce7f3; color: #db2777;
}
[data-theme="dark"] [data-box-type="support"] .support-link:nth-child(3) .support-icon {
    background: #831843; color: #f9a8d4;
}



[data-box-type="links"] .support-link:nth-child(1) .support-icon {
    background: #FFFFFF; color: #FFFFFF;
}
[data-box-type="links"] .support-link:nth-child(2) .support-icon {
    background: #FFFFFF; color: #FFFFFF;
}
[data-box-type="links"] .support-link:nth-child(3) .support-icon {
    background: #FFFFFF; color: #FFFFFF;
}
[data-box-type="links"] .support-link:nth-child(4) .support-icon {
    background: #FFFFFF; color: #FFFFFF;
}

.footer-card {
    background: var(--card-bg);
    border-radius: clamp(10px, 1.5vw, 12px);
    padding: clamp(15px, 2vw, 25px);
    box-shadow: var(--shadow);
    text-align: center;
}

.stars {
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.heart {
    color: var(--heart-color);
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); opacity: 0.8; }
    25% { transform: scale(1.1); opacity: 1; }
    50% { transform: scale(1); opacity: 0.8; }
    75% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

.footer-note {
    font-size: clamp(0.7rem, 1vw, 0.8rem);
    color: var(--text-muted);
    display: block;
    margin-top: 0.3rem;
}

.copyright {
    font-size: clamp(0.8rem, 1vw, 0.9rem);
    color: var(--text-muted);
}

.share-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-overlay);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.share-modal {
    background: var(--card-bg);
    border-radius: clamp(12px, 2vw, 16px);
    padding: clamp(1.5rem, 3vw, 2rem);
    max-width: min(500px, 95vw);
    width: 90%;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    border: 1px solid var(--border-color);
    animation: modalAppear 0.4s ease;
    text-align: center;
}

@keyframes modalAppear {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.share-modal h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.share-modal p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
}

.share-link-container {
    display: flex;
    gap: clamp(0.3rem, 1vw, 0.5rem);
    margin-bottom: 1.5rem;
    flex-direction: row;
}

.share-url {
    flex: 1;
    padding: clamp(0.6rem, 1vw, 0.8rem) clamp(0.8rem, 1.2vw, 1rem);
    background: var(--support-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: monospace;
    font-size: clamp(0.8rem, 1vw, 0.9rem);
    color: var(--text-primary);
    cursor: text;
    white-space: pre;
    text-align: left !important;
    min-width: 0;
}

.copy-button {
    background: #22c55e;
    color: white;
    border: none;
    padding: clamp(0.6rem, 1.2vw, 0.8rem) clamp(1rem, 2vw, 1.5rem);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: clamp(0.85rem, 1vw, 0.9rem);
}

.copy-button:hover {
    background: #16a34a;
    transform: translateY(-2px);
}

.copy-button.copied {
    background: #16a34a;
    animation: copiedPulse 0.5s;
}

@keyframes copiedPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.share-tips {
    text-align: left;
    margin-bottom: 1.5rem;
    padding: clamp(0.8rem, 1.5vw, 1rem);
    background: var(--support-bg);
    border-radius: 8px;
    border-left: 4px solid #22c55e;
}

.share-tips strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
}

.share-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.share-tips li {
    color: var(--text-secondary);
    margin: 0.3rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: clamp(0.85rem, 1vw, 0.9rem);
}

.share-tips li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: #22c55e;
}

.security-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.security-list li {
    padding: 8px 12px;
    margin: 6px 0;
    background: rgba(34, 197, 94, 0.08);
    border-radius: 6px;
    border-left: 3px solid #22c55e;
}

@media (max-width: 767px) {
    .cards-row {
        flex-direction: column;
    }
    
    .features {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .theme-toggle {
        position: absolute;
        background: rgba(34, 197, 94, 0.1);
        border-radius: 20px;
        z-index: 100;
        width: 50px;
        height: 50px;
    }
    
    .theme-icon {
        font-size: 20px;
    }
    
    .share-link-container {
        flex-direction: column;
    }
    
    .support-link {
        flex-wrap: wrap;
    }
    
    .support-icon {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
        padding: 6px;
    }
    
    .theme-icon {
        font-size: 18px;
    }
}

@media (max-width: 360px) {
    .theme-toggle {
        top: 8px;
        right: 8px;
        width: 40px;
        height: 40px;
        padding: 5px;
    }
    
    .theme-icon {
        font-size: 16px;
    }
}

* {
    transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease, transform 0.3s ease;
}

.api-examples-list {
    margin: 25px 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.api-example {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.api-example:hover {
    border-color: #22c55e;
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.1);
    transform: translateY(-2px);
}

.example-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: var(--support-bg);
    border-bottom: 1px solid var(--border-color);
}

.example-icon {
    font-size: 1.5em;
}

.example-header h3 {
    margin: 0;
    flex: 1;
    font-size: 1.1em;
    color: var(--text-primary);
}

.example-badge {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.example-description {
    padding: 12px 20px 0 20px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95em;
    border-bottom: 1px solid var(--border-light);
}

.api-example pre {
    margin: 0;
    border-radius: 0;
    border: none;
    border-top: 1px solid #2d2d2d;
    background: #1a1a1a !important;
    position: relative;
    padding-right: 50px;
}

.api-example code {
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 0.85em;
    line-height: 1.5;
}

.copy-example-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
    z-index: 10;
}

.copy-example-btn:hover {
    background: rgba(34, 197, 94, 0.3);
}

.examples-footer {
    margin-top: 30px;
    padding: 20px;
    background: rgba(34, 197, 94, 0.05);
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(34, 197, 94, 0.1);
}

.examples-footer p {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 0.95em;
}

.examples-footer code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
}

.copy-all-btn {
    background: #22c55e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.copy-all-btn:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.3);
}

@media (max-width: 768px) {
    .example-header {
        flex-wrap: wrap;
    }
    
    .example-header h3 {
        font-size: 1em;
    }
    
    .api-example pre {
        padding: 15px;
        padding-right: 45px;
    }
    
    .api-example code {
        font-size: 0.8em;
    }
    
    .copy-example-btn {
        top: 8px;
        right: 8px;
        padding: 4px 8px;
    }
}

.close-button {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    width: 100%;
}

.close-button:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.close-button:active {
    transform: translateY(0);
}

.support-icon-img {
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
}