.ai-generator {
    width: 100%;
    padding: 40px 20px;
    box-sizing: border-box;
}

.ai-generator-card {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 32px;
    box-sizing: border-box;

    background: #ffffff;
    border: 1px solid #e8eaf0;
    border-radius: 24px;

    box-shadow:
        0 10px 30px rgba(30, 35, 60, 0.06),
        0 2px 8px rgba(30, 35, 60, 0.03);
}


/* Header */

.ai-generator-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.ai-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    color: #ffffff;
    font-size: 22px;
    font-weight: 600;

    background: linear-gradient(135deg,
            #212630,
            #2f3542);

    box-shadow:
        0 8px 18px rgba(99, 102, 241, 0.25);
}

.ai-generator-header h2 {
    margin: 2px 0 6px;

    color: #181a20;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
}

.ai-generator-header p {
    margin: 0;

    color: #737782;
    font-size: 14px;
    line-height: 1.7;
}


/* Info */

.ai-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin-bottom: 24px;
    padding: 14px 16px;

    background: #f6f7ff;
    border: 1px solid #e5e7ff;
    border-radius: 12px;

    color: #5d6380;
    font-size: 13px;
    line-height: 1.6;
}

.ai-info-icon {
    flex-shrink: 0;
}


/* Input */

.ai-input-wrapper {
    margin-bottom: 18px;
}

.ai-input-label {
    display: block;
    margin-bottom: 9px;

    color: #292c35;
    font-size: 14px;
    font-weight: 600;
}

.ai-textarea {
    width: 100%;
    min-height: 180px;

    padding: 16px;
    box-sizing: border-box;

    resize: vertical;

    border: 1px solid #dfe1e8;
    border-radius: 14px;

    background: #fafbfc;

    color: #24262d;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.7;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.ai-textarea::placeholder {
    color: #a5a8b2;
}

.ai-textarea:hover {
    border-color: #c9cbd5;
}

.ai-textarea:focus {
    background: #ffffff;
    border-color: #212630;

    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.1);
}


/* Footer */

.ai-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-top: 8px;
}

.ai-hint,
.ai-counter {
    color: #999da8;
    font-size: 12px;
}


/* Button */

.ai-generate-button {
    width: 100%;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border: none;
    border-radius: 13px;

    background: linear-gradient(135deg,
            #212630,
            #2f3542);

    color: #ffffff;

    font-family: inherit;
    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    box-shadow:
        0 8px 18px rgba(99, 102, 241, 0.22);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.ai-generate-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 10px 24px rgba(99, 102, 241, 0.3);
}

.ai-generate-button:active {
    transform: translateY(0);
}

.ai-generate-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* Status */

.ai-status {
    display: none;

    margin-top: 14px;
    padding: 12px 14px;

    border-radius: 10px;

    font-size: 13px;
    line-height: 1.5;
}

.ai-status.success {
    display: block;

    color: #18794e;
    background: #ecfdf3;
    border: 1px solid #c8f1d9;
}

.ai-status.error {
    display: block;

    color: #b42318;
    background: #fff1f0;
    border: 1px solid #ffd2ce;
}

.ai-status.loading {
    display: block;

    color: #5d6380;
    background: #f6f7ff;
    border: 1px solid #e5e7ff;
}


/* Loading */

.ai-loading-spinner {
    display: inline-block;

    width: 14px;
    height: 14px;

    flex: 0 0 14px;

    box-sizing: border-box;

    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;

    border-radius: 50%;

    animation: aiSpin 0.7s linear infinite;
}

#sponsor-container {
    padding: 20px;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: end;
}

#sponsor {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: default;
    user-select: none;
}

#sponsor-title {
    font-size: 18px;
    font-weight: bold;
    color: #112638;
}

#sponsor form {
    width: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sponsor input {
    transition: all 200ms linear;
}

#sponsor input:hover {
    border-radius: 10px;
    border: 1px solid #7c96ac;
    background-color: #ffd04f;
}

@keyframes aiSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Mobile */

@media (max-width: 600px) {

    .ai-generator {
        padding: 20px 12px;
    }

    .ai-generator-card {
        padding: 22px;
        border-radius: 18px;
    }

    .ai-generator-header {
        gap: 12px;
    }

    .ai-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .ai-generator-header h2 {
        font-size: 19px;
    }

    .ai-generator-header p {
        font-size: 13px;
    }

    .ai-textarea {
        min-height: 160px;
    }

    .ai-hint {
        max-width: 70%;
    }
}