/* General Styles */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to bottom, #ffe1a8, #ffcc00);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header Styling */
header {
    display: flex;
    flex-direction: column;
    align-items:center;
    justify-content: center;
    width: 100%;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.2);
    text-align: center;
}

.logo img {
    width: 100px;
    margin-bottom: 10px;

}

nav ul {
    list-style: none;
    justify-content: center;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    text-decoration: none;
    font-weight: bold;
    color: black;
}

/* Main Layout */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    text-align: center;
}

/* Profit Loss Calculator - Fully Centered */
.sidebar {
    width: 250px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    
    /* Centering the box */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    /* Moves the box above the chart & keeps it centered */
    position: relative;
    top: -30px; /* Adjust as needed to raise or lower */
    margin: 0 auto; /* Ensures it's centered horizontally */
}

/* Chart Section */
.chart-section {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 20px 0;
}

.chart-section img {
    width: 100%;
    max-width: 700px;
    border-radius: 10px;
}

/* Investment Boxes */
.investment-sections {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.investment-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 150px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Profile Icon */
.profile-icon img {
    width: 40px;
    border-radius: 50%;
}
.calculator-box input {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.calculator-box button {
    background-color: #ffcc00;
    color: black;
    border: none;
    padding: 10px;
    width: 100%;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.calculator-box button:hover {
    background-color: #e6b800;
}

/* Stock Chart Section */
.chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.chart input {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
    width: 60%;
    max-width: 300px;
}

.chart button {
    padding: 10px 15px;
    font-size: 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.chart button:hover {
    background-color: #0056b3;
}

canvas {
    margin-top: 20px;
    width: 100%;
    max-width: 600px;
}

/* General Styles */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to bottom, #ffe1a8, #ffcc00);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header Styling */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.2);
    text-align: center;
}

.logo img {
    width: 100px;
    margin-bottom: 10px;
}

nav ul {
    list-style: none;
    justify-content: center;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    text-decoration: none;
    font-weight: bold;
    color: black;
}

/* Main Layout */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    text-align: center;
    margin-top: 20px;
}

/* Investment Form */
.investment-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
}

.investment-form select,
.investment-form input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 90%;
    max-width: 250px;
    text-align: center;
}

.investment-form button {
    background-color: #ffcc00;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.investment-form button:hover {
    background-color: #e6b800;
}

/* Portfolio Table */
table {
    width: 100%;
    max-width: 900px;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

th {
    background: rgba(255, 255, 255, 0.6);
}

/* Chart Viewer Fix */
.chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; 
    width: 100%;
    max-width: 800px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
}

.chart input {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 80%;
    max-width: 300px;
    text-align: center;
}

.chart button {
    padding: 10px 15px;
    font-size: 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    text-align: center;
    width: 50%;
}

.chart button:hover {
    background-color: #0056b3;
}

/* Ensure the chart canvas is always centered */
canvas {
    display: block;
    margin: 20px auto;
    width: 100%;
    max-width: 600px;
}

.portfolio-summary {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    width: 60%;
}
.portfolio-summary p {
    font-size: 18px;
    font-weight: bold;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to bottom, #ffe1a8, #ffcc00);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    padding: 15px 0;
    text-align: center;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0;
}

nav ul li a {
    text-decoration: none;
    font-weight: bold;
    color: black;
}

main {
    width: 90%;
    max-width: 800px;
    text-align: center;
    margin-top: 20px;
}

.budget-summary {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.budget-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.budget-form input {
    padding: 10px;
    width: 80%;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.budget-form button {
    background-color: #ffcc00;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

th {
    background: rgba(255, 255, 255, 0.6);
}

canvas {
    max-width: 600px;
    margin-top: 20px;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    text-align: center;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 700px;
    background: white;
    padding: 20px;
    margin: auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

h1, h2 {
    color: #333;
}

button {
    background: #007BFF;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    margin-top: 10px;
    border-radius: 5px;
}

button:hover {
    background: #0056b3;
}

input, select {
    width: 80%;
    padding: 8px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

canvas {
    width: 100%;
    height: 300px;
}

.crypto-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.crypto-form input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 80%;
}

.crypto-form button {
    background-color: #ffcc00;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

canvas {
    max-width: 700px;
    margin-top: 20px;
}
