/* Import better fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Fira+Code:wght@400;500&display=swap');

.terminal-api-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #2d76cc;
    color: white;
    padding: 14px 20px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(45, 118, 204, 0.3);
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 320px;
    width: auto;
    font-family: 'Inter', sans-serif;
    border: none;
    outline: none;
}

.terminal-api-float:hover {
    background: #2563b8;
    box-shadow: 0 6px 16px rgba(45, 118, 204, 0.4);
}

.terminal-api-float:active {
    transform: scale(0.98);
}

.terminal-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.terminal-text {
    flex: 1;
}

/* Modal Overlay */
.terminal-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.terminal-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Content */
.terminal-modal-content {
    background: #1e1e1e;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.terminal-modal-overlay.active .terminal-modal-content {
    transform: scale(1);
}

/* Modal Header */
.terminal-modal-header {
    background: #2d76cc;
    padding: 18px 30px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-modal-header h2 {
    color: white;
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
}

.terminal-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
    font-family: inherit;
}

.terminal-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Modal Body */
.terminal-modal-body {
    padding: 30px;
    color: #e0e0e0;
}

.terminal-intro {
    font-size: 16px;
    margin-bottom: 25px;
    line-height: 1.6;
    font-family: 'Inter', sans-serif;
}

.terminal-section {
    margin-bottom: 30px;
}

.terminal-section h3 {
    color: #2d76cc;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

/* Highlight styling */
.highlight {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Terminal Container */
.demo-terminal {
    background: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    margin: 15px 0;
    border: 1px solid #333;
}

.demo-terminal-header {
    background: #323232;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.demo-terminal-button {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.demo-close { background: #ff5f56; }
.demo-minimize { background: #ffbd2e; }
.demo-maximize { background: #27c93f; }

.demo-terminal-title {
    color: #c5c5c5;
    font-size: 14px;
    margin-left: 10px;
    font-family: 'Inter', sans-serif;
}

.demo-terminal-body {
    background: #0c0c0c;
    color: #cccccc;
    padding: 25px;
    min-height: 300px;
    font-size: 16px;
    line-height: 1.6;
    font-family: 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-weight: 400;
    overflow-x: auto;
}

.demo-line {
    margin-bottom: 10px;
}

.demo-prompt {
    color: #4ec9b0;
    font-weight: 500;
}

.demo-path {
    color: #569cd6;
    font-weight: 500;
}

.demo-command {
    color: #dcdcaa;
    font-weight: 500;
}

.demo-cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background: #cccccc;
    animation: blink 1s infinite;
    margin-left: 2px;
    vertical-align: middle;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.demo-output {
    color: #cccccc;
    margin-top: 10px;
    white-space: pre-wrap;
    font-family: 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace;
    line-height: 1.5;
    font-weight: 400;
}

.api-format-box {
    background: #0c0c0c;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #333;
    font-family: 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #dcdcaa;
    font-size: 14px;
    margin: 15px 0;
    line-height: 1.5;
    font-weight: 400;
}

.note-box {
    background: rgba(45, 118, 204, 0.1);
    border-left: 4px solid #2d76cc;
    padding: 15px 20px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.6;
    font-family: 'Inter', sans-serif;
}

.note-box code {
    font-family: 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    font-weight: 400;
}

/* Responsive */
@media (max-width: 768px) {
    .terminal-api-float {
        bottom: 20px;
        right: 20px;
        padding: 12px 18px;
        font-size: 13px;
        max-width: 260px;
    }

    .terminal-modal-body {
        padding: 20px;
    }

    .demo-terminal-body {
        padding: 15px;
        font-size: 14px;
    }

    .terminal-modal-header h2 {
        font-size: 1.1rem;
    }
    
    .api-format-box {
        padding: 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .terminal-api-float {
        max-width: 240px;
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .terminal-icon {
        font-size: 18px;
    }
}