.ytg-wrapper {
    width: 100%;
    padding: 30px 15px;
}

.ytg-card {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, #0f172a, #1e293b, #111827);
    color: #fff;
    border-radius: 24px;
    padding: 36px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
    font-family: Arial, sans-serif;
}

.ytg-badge {
    display: inline-block;
    background: rgba(239, 68, 68, 0.15);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.35);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    margin-bottom: 18px;
}

.ytg-title {
    color: #ffffff;
    font-size: 40px;
    line-height: 1.1;
    margin: 0 0 14px;
}

.ytg-subtitle {
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 28px;
}

.ytg-input-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-bottom: 16px;
}

.ytg-input {
    width: 100%;
    padding: 17px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    font-size: 16px;
    outline: none;
}

.ytg-input::placeholder {
    color: #94a3b8;
}

.ytg-input:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.ytg-generate-btn,
.ytg-secondary-btn {
    border: none;
    cursor: pointer;
    border-radius: 14px;
    font-weight: 700;
    transition: 0.2s ease;
}

.ytg-generate-btn {
    background: #ef4444;
    color: #fff;
    padding: 0 22px;
    font-size: 15px;
}

.ytg-generate-btn:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-1px);
}

.ytg-generate-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.ytg-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0 22px;
}

.ytg-secondary-btn {
    padding: 13px 18px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.ytg-secondary-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.ytg-output-box {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 22px;
    min-height: 180px;
}

.ytg-output-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    color: #cbd5e1;
    font-size: 14px;
}

.ytg-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ytg-tag {
    background: rgba(239, 68, 68, 0.13);
    color: #fee2e2;
    border: 1px solid rgba(239, 68, 68, 0.28);
    padding: 10px 13px;
    border-radius: 999px;
    font-size: 14px;
    line-height: 1.4;
}

.ytg-empty {
    color: #94a3b8;
    line-height: 1.6;
}

.ytg-loading-box {
    width: 100%;
    text-align: center;
    padding: 22px 10px;
    color: #cbd5e1;
}

.ytg-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 255, 255, 0.16);
    border-top: 4px solid #ef4444;
    border-radius: 50%;
    margin: 0 auto 14px;
    animation: ytgSpin 0.85s linear infinite;
}

.ytg-loading-text {
    font-size: 15px;
    margin-bottom: 10px;
}

.ytg-progress {
    width: 100%;
    max-width: 360px;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.12);
}

.ytg-progress-bar {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: #ef4444;
    animation: ytgProgress var(--ytg-delay, 2s) linear forwards;
}

.ytg-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    background: #16a34a;
    color: #fff;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(18px);
    transition: all 0.25s ease;
    z-index: 999999;
}

.ytg-toast.ytg-show {
    opacity: 1;
    transform: translateY(0);
}

.ytg-toast.ytg-error {
    background: #ef4444;
}

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

@keyframes ytgProgress {
    from { width: 0%; }
    to { width: 100%; }
}

.ytg-note {
    margin-top: 22px;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 700px) {
    .ytg-card {
        padding: 24px;
    }

    .ytg-title {
        font-size: 31px;
    }

    .ytg-input-row {
        grid-template-columns: 1fr;
    }

    .ytg-generate-btn {
        padding: 16px;
    }

    .ytg-toast {
        left: 16px;
        right: 16px;
        bottom: 18px;
        text-align: center;
    }
}
