/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

p {
    text-align: center;
}

h1 {
    margin: 0;
    color: #ecf0f1;
    text-align: center;
}

h2 {
    text-align: center;
    color: #2c3e50;
    margin: 20px 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

select {
    margin-bottom: 20px;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    text-align: center;
}

table {
    margin: 20px auto;
    width: 80%;
    max-width: 800px;
    border-collapse: collapse;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 15px;
    text-align: left;
}

th {
    background-color: #2c3e50;
    color: white;
}

td {
    background-color: #fff;
}

tr:nth-child(even) td {
    background-color: #8e8d8d01;
}

a {
    color: #e74c3c;
    text-decoration: none;
    transition: color 0.3s;
}

nav a {
    color: #dff4f8;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    padding-top: 10px;
}

nav a:hover {
    text-decoration: underline;
}

a:hover {
    color: #c0392b;
    text-decoration: underline;
}

td.actions a {
    color: red;
    text-decoration: none;
}

td.actions a:hover {
    text-decoration: underline;
}

/* Input and Buttons */
input[type="text"], input[type="email"], input[type="password"] {
    width: calc(100% - 22px);
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus {
    border-color: #3498db;
}

button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

form {
    background-color: #ecf0f1;
    width: 80%;
    max-width: 600px;
    margin: 30px auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

label {
    display: block;
    margin: 15px 0 5px;
}

/* Stock Tracker Specific Styles */
.stock-tracker-container {
    text-align: center;
    margin-top: 50px;
}

#preferences {
    margin: 20px auto;
    width: 80%;
    max-width: 600px;
}

#preferences input[type="text"] {
    width: 60%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#preferences button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#preferences button:hover {
    background-color: #2980b9;
}

.pos {
    color: green;
}

.neg {
    color: red;
}

/* Responsive Design */
@media (max-width: 600px) {
    form {
        width: 90%;
    }
    #preferences input[type="text"] {
        width: 100%;
    }
    th, td {
        display: block;
        text-align: right;
    }

    th {
        display: none;
    }

    td {
        border: none;
        border-bottom: 1px solid #ddd;
        position: relative;
        padding-left: 50%;
    }

    td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 50%;
        padding-left: 15px;
        font-weight: bold;
        text-align: left;
    }

    input[type="text"], input[type="email"] {
        width: calc(100% - 20px);
    }
}
