/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
.header {
    text-align: center;
    padding: 1rem 0 2rem;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.header h1 i {
    margin-right: 0.5rem;
    opacity: 0.9;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Info Box */
.info-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-box h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.info-box h3 i {
    margin-right: 0.5rem;
    color: #ffd700;
}

.info-box p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

/* Main Panel */
.main-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    color: #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Table Container */
.table-container {
    overflow-x: auto;
}

.table-header {
    display: grid;
    grid-template-columns: 60px 1fr 1fr 1fr 1.5fr 80px;
    gap: 1rem;
    padding: 1rem;
    background: #5755d9;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1rem;
}

.table-header .col {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.table-header i {
    opacity: 0.8;
}

/* Product Rows */
#products {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.product-row {
    display: grid;
    grid-template-columns: 60px 1fr 1fr 1fr 1.5fr 80px;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
    align-items: center;
}

.product-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #5755d9;
}

/* Best Product */
.product-row.best {
    background: #f0fdf4;
    border-color: #22c55e;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.2);
}

/* Product Number */
.product-number {
    font-weight: 700;
    font-size: 1.2rem;
    color: #5755d9;
    text-align: center;
    position: relative;
}

.product-row.best .product-number {
    color: #22c55e;
}

.product-row.best .product-number::after {
    content: '👑';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.8rem;
}

/* Form Inputs */
.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    color: #1f2937;
    background: #f9fafb;
    text-align: center;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #5755d9;
    background: white;
    box-shadow: 0 0 0 3px rgba(87, 85, 217, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* Remove number arrows */
.form-input::-webkit-outer-spin-button,
.form-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* PPV Display */
.ppv-cell {
    background: linear-gradient(135deg, #5755d9, #6366f1);
    color: white;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 700;
    text-align: center;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.product-row.best .ppv-cell {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

/* Action Button */
.btn-remove {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #ef4444;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Controls */
.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-width: 140px;
    justify-content: center;
}

.btn-primary {
    background: #5755d9;
    color: white;
}

.btn-primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

/* Mobile Responsive */
/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .main-panel {
        padding: 0.75rem;
    }
    
    /* Cabeçalho compacto */
    .table-header {
        display: grid;
        grid-template-columns: 30px 1fr 1fr 1fr 1fr 40px;
        gap: 0.25rem;
        padding: 0.5rem;
        font-size: 0.7rem;
        text-align: center;
    }
    
    .table-header .col {
        flex-direction: column;
        gap: 0.2rem;
    }
    
    .table-header i {
        font-size: 0.8rem;
    }
    
    /* Produtos em linha compacta */
    .product-row {
        display: grid;
        grid-template-columns: 30px 1fr 1fr 1fr 1fr 40px;
        gap: 0.25rem;
        padding: 0.5rem;
        align-items: center;
        min-height: 60px;
    }
    
    .product-number {
        font-size: 0.8rem;
        font-weight: 700;
        color: #5755d9;
    }
    
    .product-row.best .product-number::after {
        content: '👑';
        display: block;
        font-size: 0.7rem;
    }
    
    /* Inputs menores */
    .form-input {
        padding: 0.4rem;
        font-size: 0.85rem;
        text-align: center;
        border: 1px solid #d1d5db;
        border-radius: 4px;
    }
    
    .form-input:focus {
        border-color: #5755d9;
    }
    
    /* PPV compacto */
    .ppv-cell {
        padding: 0.4rem;
        font-size: 0.75rem;
        font-weight: 700;
        border-radius: 4px;
        text-align: center;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Botão menor */
    .btn-remove {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    /* Controles */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Para celulares muito pequenos */
@media (max-width: 380px) {
    .table-header,
    .product-row {
        grid-template-columns: 25px 0.8fr 0.8fr 0.8fr 1fr 35px;
        gap: 0.15rem;
    }
    
    .form-input {
        padding: 0.3rem;
        font-size: 0.8rem;
    }
    
    .ppv-cell {
        font-size: 0.7rem;
        padding: 0.3rem;
    }
    
    .table-header {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.75rem;
    }
    
    .info-box {
        padding: 1rem;
    }
    
    .product-row {
        padding: 1rem;
    }
    
    .form-input {
        padding: 0.875rem;
        font-size: 1rem;
		font-weight:500;
    }
    
    .ppv-cell {
        padding: 1rem;
        font-size: 1.1rem;
    }
}