* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

main {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.input-section {
    margin-bottom: 40px;
}

.size-selector {
    margin-bottom: 30px;
    text-align: center;
}

.size-selector label {
    font-weight: 600;
    margin-right: 15px;
    color: #555;
}

.size-selector select {
    padding: 10px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.matrix-input h3 {
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.matrix-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.matrix-grid input {
    width: 80px;
    height: 50px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.matrix-grid input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.constants-vector {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.constants-vector input {
    width: 80px;
    height: 50px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.constants-vector input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.solve-button {
    display: block;
    width: 200px;
    margin: 0 auto;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.solve-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

.solve-button:active {
    transform: translateY(-1px);
}

.results-section {
    border-top: 2px solid #f0f0f0;
    padding-top: 30px;
}

.results-section h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-weight: 600;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.result-card h4 {
    color: #555;
    margin-bottom: 15px;
    font-weight: 600;
}

.result-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
    word-break: break-word;
}

.step-by-step {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

.step-by-step h4 {
    color: #555;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.step {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.step h5 {
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.step-content {
    color: #666;
    line-height: 1.8;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #fcc;
    margin-top: 20px;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    main {
        padding: 25px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .matrix-grid input,
    .constants-vector input {
        width: 60px;
        height: 45px;
        font-size: 14px;
    }
    
    .solve-button {
        width: 100%;
        max-width: 250px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .matrix-grid input,
    .constants-vector input {
        width: 50px;
        height: 40px;
        font-size: 12px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    main {
        padding: 20px;
    }
} 