/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #000000;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
}

/* Background geometric pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 0, 0, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(255, 0, 0, 0.02) 1px, transparent 1px),
        radial-gradient(circle at 40% 80%, rgba(255, 0, 0, 0.01) 1px, transparent 1px);
    background-size: 50px 50px, 30px 30px, 40px 40px;
    pointer-events: none;
    z-index: -1;
}

/* Layout com Sidebars */
.sidebar-layout {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 30px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
}

.sidebar-left, .sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 280px;
}

.sidebar-header {
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid rgba(255, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.sidebar-header h3 {
    color: #ff0000;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.content-header {
    text-align: center;
    margin-bottom: 20px;
}

.content-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ff0000, #ff4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-header .description {
    font-size: 1.1rem;
    color: #cccccc;
    max-width: 600px;
    margin: 0 auto;
}

/* Cards de Produtos */
.produto-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.produto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
    border-color: rgba(255, 0, 0, 0.3);
}

.produto-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.produto-card h3 {
    color: #ff0000;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.produto-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: auto;
}

.product-actions .btn-primary,
.product-actions .btn-secondary {
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.85rem;
    border: 2px solid;
    display: inline-block;
    box-sizing: border-box;
}

.product-actions .btn-primary {
    background: #ff0000;
    color: #ffffff;
    border-color: #ff0000;
}

.product-actions .btn-primary:hover {
    background: #cc0000;
    border-color: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.product-actions .btn-secondary {
    background: transparent;
    color: #ff0000;
    border-color: #ff0000;
}

.product-actions .btn-secondary:hover {
    background: #ff0000;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Formulário */
.form-container {
    background: rgba(0, 0, 0, 0.8);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 32px;
}

label {
    display: block;
    margin-bottom: 12px;
    color: #ff0000;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.01em;
}

input, textarea, select {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #ff0000;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

.generate-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: #ffffff;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.3);
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 0, 0, 0.4);
}

.generate-btn:active {
    transform: translateY(-1px);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loading {
    display: none;
}

.result-container {
    background: rgba(0, 0, 0, 0.8);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.result-container h3 {
    color: #ff0000;
    margin-bottom: 32px;
    font-size: 1.75rem;
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.result-section {
    margin-bottom: 32px;
}

.result-section h4 {
    color: #ff0000;
    margin-bottom: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

#descricaoGerada {
    min-height: 200px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    line-height: 1.6;
    backdrop-filter: blur(5px);
}

.char-count {
    text-align: right;
    margin-top: 5px;
    color: #cccccc;
    font-size: 0.9rem;
}

.tags-container .char-count {
    margin-top: 15px;
    padding: 8px 12px;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 6px;
    color: #ff0000;
    font-weight: bold;
    text-align: center;
}

.titulos-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.titulo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 0, 0, 0.05);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.titulo-item:hover {
    background: rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 0, 0, 0.3);
    transform: translateY(-1px);
}

.titulo-text {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
    margin-right: 12px;
}

.copy-titulo-btn {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    min-width: 40px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-titulo-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.copy-titulo-btn:active {
    transform: translateY(0);
}

.tags-container, .hashtags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.tag, .hashtag {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.tag:hover, .hashtag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.action-buttons {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.copy-btn {
    flex: 1;
    padding: 16px 24px;
    background: rgba(255, 0, 0, 0.08);
    color: #ff0000;
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    backdrop-filter: blur(5px);
}

.copy-btn:hover {
    background: rgba(255, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: rgba(255, 0, 0, 0.5);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

.copy-btn:active {
    transform: translateY(0);
}

.test-api-btn {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-top: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

.test-api-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
}

.test-api-btn:active {
    transform: translateY(0);
}

.test-api-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.api-test-result {
    margin-top: 12px;
    padding: 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    display: none;
    backdrop-filter: blur(5px);
}

.api-test-result.success {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
    display: block;
}

.api-test-result.error {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
    display: block;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.9);
    border-top: 1px solid rgba(255, 0, 0, 0.1);
    padding: 30px 0;
    margin-top: 60px;
    backdrop-filter: blur(10px);
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-text {
    text-align: center;
}

.footer-main {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.5;
}

.footer-copyright {
    color: #cccccc;
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.8;
}

/* Responsividade */
@media (max-width: 1400px) {
    .sidebar-layout {
        grid-template-columns: 250px 1fr 250px;
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .sidebar-layout {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 100px 20px 40px 20px;
    }
    
    .sidebar-left,
    .sidebar-right {
        max-width: 100%;
    }
    
    .main-content {
        order: -1;
    }
    
    .content-header {
        padding: 30px 20px;
    }
    
    .content-header h2 {
        font-size: 1.8rem;
    }
    
    .content-header .description {
        font-size: 1rem;
    }
    
    .form-container {
        padding: 32px 24px;
    }
    
    .result-container {
        padding: 32px 24px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .titulo-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .titulo-text {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .copy-titulo-btn {
        align-self: flex-end;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .product-actions .btn-primary,
    .product-actions .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .sidebar-layout {
        padding: 120px 10px 40px 10px;
        gap: 20px;
    }
    
    .sidebar-header {
        padding: 15px;
    }
    
    .sidebar-header h3 {
        font-size: 1.2rem;
    }
    
    .content-header {
        padding: 30px 20px;
    }
    
    .content-header h2 {
        font-size: 1.8rem;
    }
    
    .content-header .description {
        font-size: 1rem;
    }
    
    .form-container {
        padding: 32px 24px;
    }
    
    .result-container {
        padding: 32px 24px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .titulo-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .titulo-text {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .copy-titulo-btn {
        align-self: flex-end;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .product-actions .btn-primary,
    .product-actions .btn-secondary {
        width: 100%;
    }
}