:root {
    --bg-color: #060608;
    --card-bg: rgba(13, 13, 18, 0.6);
    --card-border: rgba(255, 255, 255, 0.05);
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-glow: rgba(139, 92, 246, 0.35);
    --blue: #3b82f6;
    --blue-glow: rgba(59, 130, 246, 0.35);
    --success: #10b981;
    --success-border: rgba(16, 185, 129, 0.3);
    --success-bg: rgba(16, 185, 129, 0.08);
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    padding: 40px 20px;
}

/* Background glows */
.glow-bg {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: 1;
    pointer-events: none;
    opacity: 0.4;
}

.bg-purple {
    top: -100px;
    left: -100px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.bg-blue {
    bottom: -150px;
    right: -100px;
    background: radial-gradient(circle, var(--blue) 0%, transparent 70%);
}

/* Container */
.app-container {
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Header */
.app-header {
    text-align: center;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary) 30%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text {
    background: inherit;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 8px;
    font-weight: 300;
}

/* Grid layout */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-num {
    background: linear-gradient(135deg, var(--primary), var(--blue));
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
}

.step-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: -12px;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input {
    width: 100%;
    padding: 14px 16px;
    padding-right: 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.icon-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.helper-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.helper-text a {
    color: var(--primary);
    text-decoration: none;
}

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

code {
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    color: #f472b6;
}

/* Buttons */
.primary-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--blue) 100%);
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.25);
    transition: var(--transition);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

.primary-btn:active {
    transform: translateY(0);
}

/* Status Cards */
.status-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    animation: fadeIn 0.4s ease-out;
}

.status-card.success {
    background: var(--success-bg);
    border-color: var(--success-border);
}

.status-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-title {
    font-weight: 600;
    font-size: 1rem;
}

.success .status-title {
    color: var(--success);
}

.status-msg {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.bot-link-btn {
    align-self: flex-start;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.bot-link-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.status-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
    margin-top: 2px;
}

.success-icon {
    width: 24px;
    height: 24px;
    background: var(--success);
    color: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.chat-id-badge {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}

.chat-id-badge span {
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Prompt Card Panel */
.prompt-container {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.prompt-header {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lang-label {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.copy-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
}

.copy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.copy-success {
    color: var(--success);
    font-weight: 600;
}

.prompt-code-wrapper {
    background: rgba(0, 0, 0, 0.25);
    padding: 24px;
    max-height: 280px;
    overflow-y: auto;
}

pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

code#magic-prompt-box {
    font-family: var(--font-mono);
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: 0.85rem;
    color: #c084fc;
    line-height: 1.6;
}

/* Instructions card */
.instructions-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 20px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
}

.instructions-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.instructions-card ul {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.instructions-card li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 18px;
    line-height: 1.4;
}

.instructions-card li::before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 4px;
    font-weight: bold;
}

/* Footer */
.app-footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Utilities */
.hidden {
    display: none !important;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
