body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f0f2f5;
    color: #333;
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 900px;
    margin: 40px auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    transition: background 0.3s ease, color 0.3s ease;
}

form input, form select, form button {
    display: block;
    margin: 10px 0;
    padding: 10px;
    width: 100%;
    transition: background 0.3s ease, color 0.3s ease, border 0.3s ease;
}

form button {
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
}

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

.success {
    color: green;
}

.error {
    color: red;
}

.code-form input {
    padding: 10px;
    width: 80%;
    margin-bottom: 10px;
}

.code-form button {
    padding: 10px 20px;
    background-color: #0077cc;
    color: white;
    border: none;
    cursor: pointer;
}

/* 🌙 Dark Mode Styles */
body.dark-mode {
    background: #121212;
    color: #e0e0e0;
}

body.dark-mode .container {
    background: #1e1e1e;
    color: #e0e0e0;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #444;
}

body.dark-mode button {
    background-color: #3a3a3a;
    color: #fff;
}

body.dark-mode button:hover {
    background-color: #555;
}

/* 🌙 Dark Mode */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode a {
    color: #4da3ff;
}

body.dark-mode table {
    border-color: #333;
}

body.dark-mode th {
    background-color: #1f1f1f;
    color: #fff;
}

body.dark-mode td {
    background-color: #1a1a1a;
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select,
body.dark-mode button {
    background-color: #1f1f1f;
    color: #e0e0e0;
    border: 1px solid #333;
}

body.dark-mode button:hover {
    background-color: #333;
}

.action-msg {
    text-align: center;
    font-weight: bold;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    background-color: #e0f7fa;
    color: #00796b;
}

/* Aktien-Tabellen */
table {
    table-layout: fixed; /* Text umbrechen */
}

table tr:hover {
    background-color: #e3f2fd;
}

/* Gewinn/Verlust in Portfolio */
.portfolio-profit {
    color: green;
    font-weight: bold;
}

.portfolio-loss {
    color: red;
    font-weight: bold;
}

/* Chart.js Canvas */
canvas {
    max-width: 100%;
    height: auto !important;
}

/* Formulare für Aktien kaufen/verkaufen */
form input[type="number"] {
    width: 60px;
    display: inline-block;
}

form button {
    display: inline-block;
    padding: 6px 12px;
    font-weight: bold;
}

/* Kleine Responsive Anpassung */
@media (max-width: 768px) {
    table th, table td {
        font-size: 14px;
        padding: 8px;
    }

    form input[type="number"] {
        width: 50px;
    }
}
