body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}
header {
    background: #35424a;
    color: #ffffff;
    padding: 10px 0;
    text-align: center;
}

form {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

input[type="text"],
input[type="date"],
textarea {
    padding: 10px;
    margin: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 30%;
}

button {
    padding: 10px 15px;
    background: #35424a;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #45a049;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

th, td {
    border: 1px solid #e0e0e0;
    padding: 10px 12px;
    font-size: 1em;
    vertical-align: middle;
}

th {
    background-color: #f7f7f7;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.03em;
}

tr:nth-child(even) {
    background: #fafbfc;
}

.star-btn {
    background: none;
    border: none;
    font-size: 1.3em;
    cursor: pointer;
    color: #f5b301;
    outline: none;
}

.star-btn:focus {
    outline: 2px solid #f5b301;
}

.yahoo-btn {
    background: #430297;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 12px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}
.yahoo-btn:hover {
    background: #6d3be4;
}

.notes-popup {
    cursor: pointer;
    color: #333;
    text-decoration: underline dotted;
}

.notes-tooltip {
    font-size: 1em;
    line-height: 1.4;
    word-break: break-word;
}
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

header {
    background: #35424a;
    color: #ffffff;
    padding: 10px 0;
    text-align: center;
}

h1 {
    margin: 0;
}

form {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

input[type="text"],
input[type="date"],
textarea {
body {
    font-family: Arial, sans-serif;
    margin: 2em;
    background: #f9f9f9;
}
form, .stock-item, #portfolio {
    margin-bottom: 1.5em;
}
input, button, label {
    margin: 0.2em 0.5em 0.2em 0;
    padding: 0.3em;
}
.stock-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1em;
    margin-bottom: 0.5em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}
#portfolio {
    max-width: 600px;
}
iframe {
    border-radius: 8px;
    margin-top: 1em;
}
    padding: 10px;
    margin: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 30%;
}

button {
    padding: 10px 15px;
    background: #35424a;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #45a049;
}

.stock-list {
    list-style: none;
    padding: 0;
}

.stock-item {
    background: #ffffff;
    margin: 10px 0;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stock-item:hover {
    background: #f9f9f9;
}

.stock-item button {
    background: #007bff;
}

.stock-item button:hover {
    background: #0056b3;
}

iframe {
    width: 100%;
    height: 400px;
    border: none;
    margin-top: 20px;
}

/* GitHub Authentication Section */
.auth-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.auth-section h3 {
    margin-top: 0;
    color: #495057;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #495057;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

.form-group small a {
    color: #007bff;
    text-decoration: none;
}

.form-group small a:hover {
    text-decoration: underline;
}

.github-connected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
}

/* Portfolio Actions */
.actions-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.btn-primary {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover:not(:disabled) {
    background: #0056b3;
}

.btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #545b62;
}

.status-message {
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    display: none;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: inline-block;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: inline-block;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: inline-block;
}

/* Remove button styling */
.remove-btn {
    background: none !important;
    color: #ccc;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    padding: 2px;
    font-size: 16px;
    transition: color 0.2s ease;
    line-height: 1;
}

.remove-btn:hover {
    color: #f44336 !important;
    transform: scale(1.1);
}

/* Save button states */
.btn-primary:disabled {
    background-color: #e0e0e0 !important;
    color: #999 !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
}

.btn-primary:disabled:hover {
    background-color: #e0e0e0 !important;
    transform: none !important;
}

.btn-primary.has-changes {
    background-color: #4CAF50 !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

/* Unsaved changes indicator in title */
title:before {
    content: "* ";
    color: #ff6b6b;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 95%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 10px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: #35424a;
}

.close {
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    background: none;
    border: none;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #35424a;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #35424a;
    box-shadow: 0 0 0 2px rgba(53, 66, 74, 0.1);
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-buttons button {
    min-width: 120px;
    padding: 12px 20px;
    font-size: 14px;
}

/* Date input styling */
.edit-date:focus {
    outline: none;
    background: #f9f9f9 !important;
    border: 1px solid #ddd !important;
}

.btn-primary {
    background-color: #35424a;
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Notes Popup Styles */
.notes-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.notes-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.notes-popup-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    transform: scale(0.8) translateY(20px);
    transition: transform 0.3s ease;
}

.notes-popup-overlay.show .notes-popup-content {
    transform: scale(1) translateY(0);
}

.notes-popup-header {
    padding: 20px 20px 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notes-popup-header h3 {
    margin: 0;
    color: #35424a;
    font-size: 18px;
}

.notes-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.notes-popup-close:hover {
    color: #666;
}

.notes-popup-body {
    padding: 20px;
}

.notes-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.notes-textarea:focus {
    outline: none;
    border-color: #35424a;
    box-shadow: 0 0 0 2px rgba(53, 66, 74, 0.1);
}