/**
 * Magic Playground Styles - Dark Theme with Yellow Accents
 */

.magic-playground {
    --mp-bg-dark: #0f172a;
    --mp-bg-card: #1e293b;
    --mp-bg-card-light: rgba(255, 255, 255, 0.05);
    --mp-primary: #facc15;
    --mp-primary-hover: #eab308;
    --mp-green: #facc15;
    --mp-blue: #3b82f6;
    --mp-purple: #a855f7;
    --mp-border: rgba(255, 255, 255, 0.1);
    --mp-text: #f8fafc;
    --mp-text-muted: #94a3b8;
    --mp-error: #ef4444;
    --mp-radius: 16px;
    --mp-radius-sm: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 900px;
    margin: 0 auto;
}

.magic-playground__card {
    background: linear-gradient(135deg, var(--mp-bg-dark) 0%, #1a2744 100%);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius);
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 32px;
    align-items: start;
}

.magic-playground__card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* Left Column - Info */
.magic-playground__left {
    display: flex;
    flex-direction: column;
}

/* Divider */
.magic-playground__divider {
    background: var(--mp-border);
    width: 1px;
    align-self: stretch;
}

/* Right Column - Form */
.magic-playground__right {
    display: flex;
    flex-direction: column;
}

/* Header */
.magic-playground__header {
    text-align: left;
    margin-bottom: 16px;
    position: relative;
}

.magic-playground__icon {
    display: none;
}

.magic-playground__badge {
    display: inline-block;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--mp-primary);
    border-radius: 50px;
    color: var(--mp-primary);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}

.magic-playground__title {
    font-size: 32px;
    font-weight: 700;
    color: var(--mp-text);
    margin: 0 0 4px;
    line-height: 1.1;
}

.magic-playground__title-accent {
    color: var(--mp-text-muted);
    font-size: 16px;
    font-weight: 400;
    font-style: italic;
    margin-left: 6px;
}

.magic-playground__description {
    font-size: 14px;
    color: var(--mp-text-muted);
    margin: 10px 0 0;
    line-height: 1.5;
}

/* Features List */
.magic-playground__features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid var(--mp-border);
}

.magic-playground__feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.magic-playground__feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--mp-primary);
    border-radius: 50%;
    flex-shrink: 0;
    color: var(--mp-bg-dark);
}

.magic-playground__feature-icon svg {
    width: 12px;
    height: 12px;
}

.magic-playground__feature-icon--green,
.magic-playground__feature-icon--blue,
.magic-playground__feature-icon--purple {
    background: var(--mp-primary);
    color: var(--mp-bg-dark);
}

.magic-playground__feature-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--mp-text);
    margin: 0;
}

.magic-playground__feature-desc {
    display: none;
}

/* Form */
.magic-playground__form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.magic-playground__confirmation,
.magic-playground__email-section {
    width: 100%;
    max-width: 100%;
}

.magic-playground__label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--mp-text);
    margin-bottom: 6px;
}

.magic-playground__label strong {
    color: var(--mp-primary);
}

.magic-playground__input-wrap {
    position: relative;
    max-width: 100%;
}

.magic-playground__input {
    width: 100%;
    padding: 10px 38px 10px 12px;
    font-size: 13px;
    background: var(--mp-bg-card);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-sm);
    color: var(--mp-text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.magic-playground__input::placeholder {
    color: var(--mp-text-muted);
}

.magic-playground__input:focus {
    border-color: var(--mp-primary);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.1);
}

.magic-playground__input--valid {
    border-color: var(--mp-primary);
}

.magic-playground__input--valid:focus {
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.15);
}

.magic-playground__input--invalid {
    border-color: var(--mp-error);
}

.magic-playground__input--invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.magic-playground__check {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--mp-primary);
}

.magic-playground__hint {
    font-size: 13px;
    color: var(--mp-text-muted);
    margin: 8px 0 0;
}

/* Email Section */
.magic-playground__email-section {
    background: var(--mp-bg-card-light);
    padding: 12px;
    border-radius: var(--mp-radius-sm);
    border: 1px solid var(--mp-border);
}

.magic-playground__checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--mp-text);
    cursor: pointer;
}

.magic-playground__checkbox-label input {
    margin-top: 7px;
    accent-color: var(--mp-primary);
}

.magic-playground__email-input {
    margin-top: 12px;
    padding-left: 0;
}

.magic-playground__email-input .magic-playground__input-wrap {
    max-width: 100%;
}

/* Button - uses site's btn classes, just add disabled state */
.magic-playground button:disabled,
.magic-playground a.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.magic-playground__link {
    background: none;
    border: none;
    color: var(--mp-text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.magic-playground__link:hover {
    color: var(--mp-text);
}

/* Loading State */
.magic-playground__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--mp-radius-sm);
    width: 100%;
    box-sizing: border-box;
}

.magic-playground__progress-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.magic-playground__spinner {
    animation: mp-spin 1s linear infinite;
    color: var(--mp-blue);
}

@keyframes mp-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.magic-playground__progress-header span {
    font-size: 13px;
    font-weight: 500;
    color: var(--mp-blue);
}

.magic-playground__progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.magic-playground__progress-fill {
    height: 100%;
    background: var(--mp-blue);
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 0%;
}

.magic-playground__progress-hint {
    font-size: 12px;
    color: var(--mp-text-muted);
    margin: 0;
}

/* Success State */
.magic-playground__success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(250, 204, 21, 0.1);
    border: 1px solid rgba(250, 204, 21, 0.3);
    border-radius: var(--mp-radius-sm);
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.magic-playground__success-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--mp-primary);
    font-weight: 600;
    font-size: 14px;
}

.magic-playground__success-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.magic-playground__success-hint {
    font-size: 12px;
    color: var(--mp-text-muted);
    margin: 0;
    text-align: center;
}

/* Error State */
.magic-playground__error {
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--mp-radius-sm);
    width: 100%;
    margin: 0 0 12px;
    box-sizing: border-box;
}

.magic-playground__error p {
    margin: 0;
    font-size: 13px;
    color: var(--mp-error);
    text-align: center;
}

/* Footer */
.magic-playground__footer {
    font-size: 12px;
    color: var(--mp-text-muted);
    text-align: left;
    margin: 16px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--mp-border);
    grid-column: 1 / -1;
}

/* Responsive - Stack vertically on mobile */
@media (max-width: 768px) {
    .magic-playground__card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .magic-playground__divider {
        width: 100%;
        height: 1px;
    }

    .magic-playground__title {
        font-size: 28px;
    }

    .magic-playground__title-accent {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }

    .magic-playground__footer {
        margin-top: 12px;
        padding-top: 12px;
    }
}
