:root {
    --bg-color: #050505;
    --panel-bg: #111111;
    --card-bg: #0d0d0d;
    --cyan: #00FFFF;
    --purple: #9d4edd;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #666666;
    --error: #ff4d4d;
    --success: #00ff88;
    --border: rgba(255, 255, 255, 0.08);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    background-color: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

.logo-box {
    width: 20px;
    height: 20px;
    background-color: var(--cyan);
    margin-right: 10px;
    display: inline-block;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.cyan {
    color: var(--cyan);
}

.status-indicator {
    display: flex;
    align-items: center;
    background-color: rgba(0, 255, 136, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.status-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--success);
    letter-spacing: 1px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse-ring 1.5s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.5; }
}

/* Hero */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
}

.gradient-text {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 800;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.subheadline {
    font-size: clamp(1rem, 4vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* Demo Section */
.demo-card {
    background-color: var(--panel-bg);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--cyan);
    margin-bottom: 1rem;
}

.input-panel, .output-panel {
    display: flex;
    flex-direction: column;
}

.input-group {
    margin-bottom: 2rem;
}

input[type="text"], textarea {
    width: 100%;
    background-color: #070707;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]:focus, textarea:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.15);
}

textarea {
    height: 250px;
    resize: none;
    margin-bottom: 1rem;
}

.template-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.template-btn {
    background-color: transparent;
    border: 1px solid #333;
    color: var(--text-muted);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-btn:hover {
    border-color: var(--purple);
    color: var(--text-primary);
}

.glow-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--cyan);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.25);
    transition: all 0.3s ease;
}

.glow-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 255, 255, 0.4);
    background-color: #33ffff;
}

.glow-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #555;
    box-shadow: none;
}

/* Output Panel */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.icon-btn {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid var(--cyan);
    color: var(--cyan);
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
}

.icon-btn:hover {
    background: var(--cyan);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    transform: translateY(-1px);
}

.output-box {
    flex-grow: 1;
    background-color: #070707;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 1.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

.output-box::-webkit-scrollbar {
    width: 6px;
}

.output-box::-webkit-scrollbar-thumb {
    background-color: #333;
    border-radius: 10px;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--cyan);
    text-align: center;
}

/* Footer */
footer {
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-tags {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-tags span {
    font-size: 0.7rem;
    font-weight: 700;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid #222;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

/* Mobile Tweaks */
@media (max-width: 600px) {
    .container {
        padding: 0 1rem;
    }
    
    .demo-card {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .demo-grid {
        grid-template-columns: 1fr;
    }
    
    .output-box {
        min-height: 300px;
    }
}
