/* Informações de créditos */
.tg-credits-info {
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    border: 1px solid #28a745;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    text-align: center;
}

.tg-credits-info p {
    margin: 0;
    color: #155724;
    font-size: 1em;
    font-weight: 500;
}

.tg-credits-info strong {
    color: #0d4419;
    font-weight: 600;
}

/* Descrição do template */
.tg-template-description {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: left;
}

.tg-template-description h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1.1em;
    font-weight: 600;
}

.tg-template-description p {
    margin: 0;
    color: #6c757d;
    font-size: 0.95em;
    line-height: 1.5;
}

/* Carrossel de imagens */
.tg-generated-carousel {
    text-align: center;
    animation: tg-fadeIn 0.5s ease-in;
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 20px;
}

.tg-generated-carousel:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.tg-carousel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.tg-carousel-item {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tg-carousel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.tg-carousel-item img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    display: block;
    border-radius: 8px 8px 0 0;
}

.tg-carousel-item .tg-image-actions {
    padding: 10px;
    background: #fff;
    border-radius: 0 0 8px 8px;
}

.tg-carousel-item .tg-download-btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 15px;
    display: inline-block;
    width: auto;
}

.tg-carousel-actions {
    text-align: center;
    margin-top: 20px;
}

.tg-carousel-actions .tg-generate-btn {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    padding: 12px 25px;
    font-size: 15px;
}

.tg-carousel-actions .tg-generate-btn:hover {
    background: linear-gradient(135deg, #5f3dc4, #6c5ce7);
}

/* Layout responsivo para carrossel */
@media (max-width: 1024px) {
    .tg-carousel-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .tg-carousel-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 500px;
    }
    
    .tg-carousel-item img {
        max-height: 200px;
    }
    
    .tg-carousel-actions .tg-generate-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .tg-carousel-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 300px;
    }
    
    .tg-carousel-item img {
        max-height: 250px;
    }
    
    .tg-carousel-item .tg-download-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Estilos para o frontend do Socialpix */

.tg-image-generator {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tg-image-generator h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.5em;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.tg-image-container {
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tg-generate-btn {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,115,170,0.3);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.tg-generate-btn:hover {
    background: linear-gradient(135deg, #005a87, #004066);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,115,170,0.4);
}

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

.tg-generate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.tg-generated-image {
    text-align: center;
    animation: tg-fadeIn 0.5s ease-in;
}

.tg-generated-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-bottom: 15px;
}

.tg-image-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.tg-download-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(40,167,69,0.3);
}

.tg-download-btn:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40,167,69,0.4);
    color: #fff;
    text-decoration: none;
}

/* Stories Container */
.tg-stories-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tg-stories-container h3 {
    margin: 0 0 30px 0;
    color: #333;
    font-size: 1.8em;
    text-align: center;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 15px;
}

.tg-story-item {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
}

.tg-story-item h4 {
    margin: 0 0 15px 0;
    color: #555;
    font-size: 1.2em;
}

/* Login Form */
.tg-login-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    margin: 20px auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 400px;
}

.tg-login-form h3 {
    margin: 0 0 20px 0;
    color: #333;
    text-align: center;
    font-size: 1.5em;
}

.tg-login-form form {
    margin: 0;
}

.tg-login-form p {
    margin-bottom: 15px;
}

.tg-login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.tg-login-form input[type="text"],
.tg-login-form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.tg-login-form input[type="checkbox"] {
    margin-right: 5px;
}

.tg-login-form input[type="submit"] {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 25px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    font-weight: 600;
}

.tg-login-form input[type="submit"]:hover {
    background: linear-gradient(135deg, #005a87, #004066);
}

/* Mensagens */
.tg-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 500;
}

.tg-message p {
    margin: 0 0 10px 0;
}

.tg-message p:last-child {
    margin-bottom: 0;
}

.tg-login-required {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.tg-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.tg-limit-exceeded {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.tg-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.tg-login-link {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

.tg-login-link:hover {
    background: linear-gradient(135deg, #005a87, #004066);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Loading */
.tg-loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: tg-spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes tg-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Responsivo */
@media (max-width: 768px) {
    .tg-image-generator,
    .tg-stories-container,
    .tg-login-form {
        margin: 15px 0;
        padding: 15px;
    }
    
    .tg-generate-btn {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    .tg-image-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .tg-download-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .tg-login-form {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .tg-image-generator h3,
    .tg-stories-container h3 {
        font-size: 1.3em;
    }
    
    .tg-story-item {
        padding: 15px;
    }
    
    .tg-generate-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Efeitos especiais */
.tg-image-generator:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.tg-stories-container:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Gradiente de fundo para containers principais */
.tg-image-generator,
.tg-stories-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* Estilo para imagens em grid (stories) */
.tg-stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tg-story-grid-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.tg-story-grid-item img {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}



.tg-login-form {
    margin-left: auto;
    margin-right: auto;
}

