* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

header {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #4a5568;
    font-size: 1.8rem;
}

#navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-btn {
    background: #4299e1;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.nav-btn:hover {
    background: #3182ce;
}

.user-info {
    color: #4a5568;
    font-weight: 500;
}

.section {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hidden {
    display: none !important;
}

.form-container {
    max-width: 400px;
    margin: 0 auto 2rem;
    padding: 2rem;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #4a5568;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.btn-primary {
    width: 100%;
    background: #4299e1;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background: #3182ce;
}

.message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
}

.message.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

.products-container {
    max-width: 800px;
    margin: 0 auto;
}

.products-list {
    margin-top: 2rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.product-card {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-card h4 {
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.product-card .price {
    color: #38a169;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.product-card .category {
    color: #718096;
    font-size: 0.9rem;
    text-transform: capitalize;
}

/* Estilos do Diagrama MVC */
.diagram-container {
    max-width: 1000px;
    margin: 0 auto;
}

.mvc-diagram {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.mvc-layer {
    flex: 1;
    min-width: 250px;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.mvc-layer:hover {
    transform: translateY(-5px);
}

.view-layer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.controller-layer {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.model-layer {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.mvc-layer h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.layer-content {
    text-align: left;
}

.layer-content p {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.layer-content ul {
    margin-bottom: 1rem;
    padding-left: 1rem;
}

.layer-content li {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.mvc-arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 0 1rem;
}

.arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.arrow span {
    font-size: 0.8rem;
    color: #4a5568;
    font-weight: 500;
    text-align: center;
}

.arrow-line {
    font-size: 1.5rem;
    color: #4299e1;
    font-weight: bold;
}

.interaction-flow {
    margin-top: 3rem;
    padding: 2rem;
    background: #f7fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.interaction-flow h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2d3748;
}

.flow-steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.flow-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 600px;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.step-number {
    background: #4299e1;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.flow-arrow {
    font-size: 1.5rem;
    color: #4299e1;
    font-weight: bold;
}

@media (max-width: 768px) {
    .mvc-diagram {
        flex-direction: column;
    }
    
    .mvc-arrows {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
    
    .arrow-line {
        transform: rotate(90deg);
    }
    
    .container {
        padding: 10px;
    }
    
    header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}