@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&family=Montserrat:wght@700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

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

.back-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #1565C0;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 20px;
}

.back-button:hover {
    background-color: #0D47A1;
}

h1 {
    text-align: center;
    color: #1565C0;
    margin-bottom: 30px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: -0.5px;
}

.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 30px;
}

.title-container img {
    width: 48px;
    height: 48px;
}

.title-container h1 {
    margin: 0;
    font-size: 2rem;
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.input-section {
    grid-column: 1 / -1;
}

.mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #1565C0;
    background: none;
    color: #1565C0;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.mode-btn.active {
    background-color: #1565C0;
    color: white;
}

.input-mode {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.input-mode.hidden {
    display: none;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input[type="number"] {
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

button {
    padding: 10px 20px;
    background-color: #1565C0;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

button:hover {
    background-color: #0D47A1;
}

.visualization-section {
    width: 100%;
    height: 600px;
    overflow: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
}

canvas {
    display: block;
    margin: 0 auto;
    width: 100%;
    height: 100%;
    min-height: 300px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: white;
}

.results-section {
    grid-column: 2 / 3;
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
}

#resultsList {
    margin-top: 10px;
}

.result-item {
    background-color: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.result-item:hover {
    background-color: #e3f2fd;
    cursor: pointer;
}

.input-mode h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

label {
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 500;
}

.topbar {
    background-color: #2196F3;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    width: 48px;
    height: 48px;
}

.app-name {
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}
