/* Basic Styling */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #ced4da;
    --text-color: #212529;
    --white: #fff;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --border-radius: 5px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.5;
}

nav {
    background-color: #343a40; /* Darker shade */
    color: var(--white);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav h1 {
    margin: 0;
    font-size: 1.5rem;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 1rem;
    font-size: 0.9rem;
}

nav ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

nav ul li a:hover {
    color: var(--white);
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 2rem auto; /* Center content */
}

footer {
    margin-top: 2rem;
    padding: 1rem;
    text-align: center;
    background-color: var(--medium-gray);
    color: #6c757d;
    font-size: 0.9rem;
    border-top: 1px solid var(--dark-gray);
}

.flashes {
    margin-bottom: 1.5rem;
    padding: 0;
    list-style: none;
}

.flash {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
}

.flash-success { background-color: #d4edda; color: #155724; border-color: #c3e6cb; }
.flash-error { background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.flash-info { background-color: #d1ecf1; color: #0c5460; border-color: #bee5eb; }

.button, button {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius);
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    text-decoration: none;
    margin: 5px 0;
}

button:disabled {
    background-color: #cccccc;
    border-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.65;
}

.button:hover, button:hover:not(:disabled) {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--white);
}

input[type="text"],
input[type="password"] {
    padding: 0.5rem;
    margin-right: 5px;
    border: 1px solid var(--dark-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    line-height: 1.5;
    width: calc(100% - 1rem - 10px); /* Full width minus padding/margin */
}

label {
    display: inline-block;
    margin-bottom: .5rem;
    font-weight: 500;
}

/* Login Page Specific */
.login-container {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.login-google,
.login-password {
    flex: 1;
    min-width: 300px; /* Minimum width before wrapping */
    text-align: center;
    padding: 2rem;
    border: 1px solid var(--dark-gray);
    border-radius: var(--border-radius);
    background-color: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.login-google h2,
.login-password h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 500;
}

.login-password form div {
    margin-bottom: 1rem;
    text-align: left;
}

.login-password form label {
    width: 100%; /* Make labels take full width */
}

.login-password form input[type="text"],
.login-password form input[type="password"] {
     width: 100%; /* Make inputs take full width */
     box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.login-password form button {
    width: 100%;
}


/* Copy Progress Specific Styling */
h2 {
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.copy-container {
    display: flex;
    gap: 2rem; /* Increased spacing between columns */
    margin-bottom: 2rem;
    flex-wrap: wrap; /* Allow wrapping */
}

.column {
    flex: 1; /* Each column takes equal space */
    min-width: 350px; /* Minimum width before wrapping */
    background-color: var(--white);
    padding: 1.5rem;
    border: 1px solid var(--dark-gray);
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.column h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 500;
}

.column input[type="text"] {
    width: calc(100% - 90px - 1rem); /* Adjust width considering button */
    margin-bottom: 0.5rem; /* Add space below input */
    box-sizing: border-box;
}

.column button {
    width: 80px; /* Fixed width for search button */
    margin-left: 5px;
}

.results-area {
    margin-top: 1rem;
    border-top: 1px solid var(--medium-gray);
    padding-top: 1rem;
    max-height: 400px; /* Limit height and allow scrolling */
    overflow-y: auto;
}

.account-group {
    margin-bottom: 1rem;
    border-bottom: 1px dashed var(--dark-gray);
    padding-bottom: 1rem;
}
.account-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.account-group h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1em;
    font-weight: 500;
}

.profile-item {
    padding: 0.6rem 0.8rem;
    margin-bottom: 5px;
    border: 1px solid transparent; /* Placeholder for selection border */
    border-radius: var(--border-radius);
    cursor: pointer;
    list-style: none; /* Remove default list bullets */
    display: flex; /* Use flexbox to align items */
    justify-content: space-between; /* Push stats to the right */
    align-items: center; /* Vertically align items */
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.profile-item:hover {
    background-color: var(--medium-gray);
}

.profile-item.selected {
    border-color: var(--primary-color);
    background-color: #e7f3ff; /* Lighter blue */
    font-weight: 500;
}

.profile-item span:first-child {
    margin-right: 10px; /* Space between name and stats */
    flex-grow: 1; /* Allow name to take available space */
}

.progress-stats {
    font-size: 0.85em;
    color: #6c757d; /* Slightly muted text color */
    flex-shrink: 0; /* Prevent stats from shrinking too much */
    white-space: nowrap; /* Prevent stats from wrapping */
}

.error, .error-stats {
    color: var(--danger-color); /* Bootstrap danger color */
    font-weight: 500;
}

.error-stats {
    font-size: 0.85em;
}

.copy-action {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--white);
    border: 1px solid var(--dark-gray);
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#copy-button {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

#copy-status {
    margin-top: 1rem;
    font-weight: 500;
    min-height: 1.5em; /* Reserve space for status message */
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid var(--dark-gray);
    border-radius: var(--border-radius);
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--medium-gray);
}

.modal-header h3 {
    margin: 0;
    font-weight: 500;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: var(--text-color);
    text-decoration: none;
}

.progress-section {
    margin-bottom: 1.5rem;
}

.progress-section h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--medium-gray);
    padding-bottom: 0.25rem;
}

.unit-group {
    margin-bottom: 1rem;
}

.unit-title {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.item-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0 1rem;
}

.item-list li {
    padding: 0.25rem 0;
    font-family: monospace;
    font-size: 0.9rem;
}

.progress-stats.clickable {
    cursor: pointer;
    color: var(--primary-color);
    text-decoration: underline;
}

.progress-stats.clickable:hover {
    color: var(--primary-hover);
}

/* Basic Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
    }
    nav ul {
        margin-top: 0.5rem;
    }
    nav ul li {
        margin-left: 0;
        margin-right: 1rem;
    }
    .copy-container {
        flex-direction: column;
    }
    .column input[type="text"] {
        width: calc(100% - 95px); /* Adjust for button */
    }
    .modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 1rem;
    }
} 