body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 24px;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}

h1 {
    color: #333;
    text-align: center;
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.app-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.circle-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background-color: #007bff;
    color: white;
    font-size: 24px;
    cursor: pointer;
    margin: 12px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-button:hover {
    transform: scale(1.1);
}

/* Edit mode toggle button */
#editListsToggle.active,
#editGuestsToggle.active {
    background-color: #fd7e14;
    transform: rotate(45deg);
}

#guestLists {
    margin-top: 12px;
    clear: both;
}

.guest-list-card {
    background-color: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    min-height: 44px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    min-height: 140px;
}

.guest-list-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.guest-list-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.guest-list-card h3 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 17px;
    line-height: 1.3;
}

.guest-list-info {
    color: #666;
    font-size: 15px;
    line-height: 1.4;
}

.guest-list-info p {
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Add visual distinction for check-in status */
.guest-list-info p:last-child {
    color: #28a745;
    font-weight: 500;
}

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

.modal-content {
    background-color: white;
    margin: 24px auto;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    z-index: 1001;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    line-height: 44px;
    text-align: center;
    color: #666;
}

.modal-content input {
    width: 100%;
    padding: 12px 16px;
    margin: 8px 0 16px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 17px;
    line-height: 1.3;
    min-height: 44px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.modal-content label {
    display: block;
    margin-top: 16px;
    color: #333;
    font-size: 15px;
    font-weight: 500;
}

/* Update the save and update buttons for guest lists */
#saveGuestList,
#updateGuestList {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 24px;
    min-height: 44px;
    font-size: 17px;
    font-weight: 500;
    width: 100%;
    transition: background-color 0.2s ease;
}

#saveGuestList:hover,
#updateGuestList:hover {
    background-color: #218838;
}

/* Style the guest buttons */
#saveGuest,
#updateGuest {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 24px;
    min-height: 44px;
    font-size: 17px;
    font-weight: 500;
    width: 100%;
    transition: background-color 0.2s ease;
}

#saveGuest:hover,
#updateGuest:hover {
    background-color: #218838;
}

/* Style the guest type dropdown */
#guestType {
    width: 100%;
    padding: 12px 16px;
    margin: 8px 0 16px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 17px;
    line-height: 1.3;
    min-height: 44px;
    background-color: white;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    box-sizing: border-box;
}

#guestType:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.15);
}

/* Style the dropdown options */
#guestType option {
    padding: 12px;
    font-size: 16px;
}

/* Active states for buttons */
#saveGuestList:active,
#updateGuestList:active,
#saveGuest:active,
#updateGuest:active {
    transform: scale(0.98);
}

/* Focus states for buttons */
#saveGuestList:focus,
#updateGuestList:focus,
#saveGuest:focus,
#updateGuest:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(40,167,69,0.3);
}

.delete-button {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    float: right;
    min-height: 44px;
    min-width: 44px;
    font-size: 15px;
    position: relative;
    z-index: 2;
}

/* Focus states for better accessibility */
input:focus,
button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.3);
}

/* Active states for touch feedback */
button:active {
    transform: scale(0.98);
}

/* Required field indicator */
label.required::after {
    content: "*";
    color: #dc3545;
    margin-left: 4px;
}

/* Improved spacing for mobile */
@media (max-width: 480px) {
    .modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    body {
        padding: 16px;
    }
}

/* View transitions */
#mainView, #guestView {
    transition: opacity 0.3s ease;
}

.hidden {
    display: none !important;
}

/* Guest view header */
.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 24px;
}

.view-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
    text-align: center;
    flex: 1;
}

/* Back button specific styling */
#backToLists {
    background-color: #f8f9fa;
    color: #666;
}

/* Guest stats */
.guest-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-label {
    display: block;
    font-size: 15px;
    color: #666;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

/* Guest list items */
.guest-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: default;
}

.guest-info {
    flex: 1;
}

.guest-name {
    font-size: 17px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.guest-details {
    font-size: 15px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 12px;
}

.guest-details span {
    display: flex;
    align-items: center;
}

.guest-details span:not(:last-child)::after {
    content: "•";
    margin-left: 12px;
    color: #ddd;
}

.check-in-button {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    border: none;
    background-color: #e9ecef;
    margin-left: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.check-in-button.checked {
    background-color: #28a745;
    transform: scale(1.05);
}

/* Delete confirmation modal */
.delete-confirm {
    text-align: center;
    max-width: 400px;
}

.delete-confirm h2 {
    color: #dc3545;
    margin-bottom: 16px;
}

.delete-confirm p {
    font-size: 17px;
    color: #333;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.secondary-btn {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    min-height: 44px;
    font-size: 17px;
    font-weight: 500;
    min-width: 120px;
}

.danger-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    min-height: 44px;
    font-size: 17px;
    font-weight: 500;
    min-width: 120px;
}

/* Empty state for guest list */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: #666;
    background: white;
    border-radius: 12px;
    margin-top: 24px;
}

.empty-state p {
    font-size: 20px;
    margin: 0 0 8px 0;
}

.empty-state .subtitle {
    font-size: 16px;
    opacity: 0.8;
}

.guest-credential {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: #007bff;
    background: rgba(0,123,255,0.1);
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: auto;
}

.guest-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.edit-button {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    border: none;
    background-color: #fd7e14;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.edit-button:hover {
    transform: scale(1.05);
    background-color: #e96b02;
}

.delete-button {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
}

.guest-actions .delete-button {
    float: none;
    background-color: #dc3545;
    color: white;
    font-weight: 300;
}

.guest-actions .delete-button:hover {
    transform: scale(1.05);
    background-color: #c82333;
}

/* Position editListsToggle button on the left */
#mainView {
    position: relative;
    padding-top: 60px;
    padding-bottom: 20px;
}

#editListsToggle {
    position: absolute;
    right: 0;
    top: 0;
}

#addGuestList {
    float: right;
    position: absolute;
    left: 0;
    top: 0;
}

/* Validation error modal */
.validation-error {
    text-align: left;
    max-width: 400px;
}

.validation-error h2 {
    color: #dc3545;
    margin-bottom: 16px;
}

.validation-error p {
    font-size: 17px;
    color: #333;
    margin-bottom: 12px;
}

.validation-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.validation-list li {
    font-size: 16px;
    color: #666;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.validation-list li:last-child {
    border-bottom: none;
}

.primary-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    min-height: 44px;
    font-size: 17px;
    font-weight: 500;
    width: 100%;
}

/* Search container */
.search-container {
    position: relative;
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    flex: 1;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 17px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 2px 12px rgba(0,123,255,0.15);
}

.search-input::placeholder {
    color: #999;
}

/* Sort dropdown styling */
.sort-container {
    min-width: 160px;
}

.sort-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    background-color: white;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23666' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sort-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 2px 12px rgba(0,123,255,0.15);
}

/* CSV Upload styling */
.file-input-container {
    margin: 24px 0;
}

.file-input {
    display: none;
}

.file-label {
    display: inline-block;
    padding: 12px 24px;
    background-color: #f8f9fa;
    border: 2px dashed #007bff;
    border-radius: 8px;
    color: #007bff;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: all 0.2s ease;
    min-height: 44px;
    box-sizing: border-box;
}

.file-label:hover {
    background-color: #e9ecef;
    border-color: #0056b3;
}

.csv-instructions {
    color: #666;
    font-size: 15px;
    margin: 16px 0;
}

.csv-instructions ul {
    margin: 8px 0;
    padding-left: 24px;
}

.csv-instructions li {
    margin: 4px 0;
}

.csv-instructions small {
    display: block;
    margin-top: 12px;
    color: #666;
    font-style: italic;
}

/* Delete all button */
.delete-all-btn {
    margin-left: auto;
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-all-btn:hover {
    background-color: #c82333;
}

/* CSV actions */
.csv-actions {
    margin: 24px 0;
}

.csv-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.csv-divider::before,
.csv-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background-color: #ddd;
}

.csv-divider::before {
    left: 0;
}

.csv-divider::after {
    right: 0;
}

.csv-divider span {
    background-color: white;
    padding: 0 12px;
    color: #666;
    font-size: 14px;
}

.secondary-btn {
    background-color: #f8f9fa;
    color: #212529;
    border: 1px solid #ddd;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    min-height: 44px;
    font-size: 17px;
    font-weight: 500;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

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

/* Style the scrollbar */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Image upload styling */
.image-upload-container {
    margin: 0 0 24px 0;
}

.image-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.image-actions .secondary-btn {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    padding: 8px 16px;
}

.image-upload-label {
    display: block;
    width: 100%;
    height: 200px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.image-upload-label:hover {
    background: #e9ecef;
    border-color: #007bff;
}

.upload-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #666;
}

.upload-placeholder svg {
    display: block;
    margin: 0 auto 8px;
}

#imagePreview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Guest list card with image */
.guest-list-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.guest-list-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.guest-list-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Adjust spacing when there's no image */
.guest-list-card:not(:has(img)) .guest-list-content {
    margin-left: 0;
}

.guest-contact {
    margin-top: 8px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.contact-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-info:hover {
    background: #e9ecef;
    color: #007bff;
}

.contact-info svg {
    flex-shrink: 0;
}

.copyable {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Sign-up form modal styling */
.form-preview {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.form-url {
    display: flex;
    gap: 12px;
    align-items: center;
}

.form-url input {
    flex: 1;
    background: white;
    margin: 0;
}

.form-url button {
    white-space: nowrap;
    margin: 0;
    padding: 12px 16px;
    min-width: auto;
}

.form-settings {
    border-top: 1px solid #eee;
    padding-top: 24px;
}

.form-settings h3 {
    margin: 0 0 16px 0;
    color: #333;
}

.form-settings textarea {
    width: 100%;
    padding: 12px 16px;
    margin: 8px 0 16px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    white-space: pre-line;
}

.form-settings textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.15);
}

/* Preview button specific styling */
#previewForm {
    background-color: #007bff;
    color: white;
    border: none;
}

#previewForm:hover {
    background-color: #0056b3;
}

/* Cropper styling */
.cropper-container {
    background: #fff;
    max-width: 900px;
    width: 90%;
    margin: 24px auto;
    padding: 24px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

#cropperOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cropper-wrapper {
    flex: 1;
    margin: 20px 0;
    background: #000;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

#cropperImage {
    max-width: 100%;
    max-height: calc(90vh - 160px);
    display: block;
}

.cropper-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
    padding: 0;
    background: transparent;
}

/* Ensure the signup form button is visible */
#signupForm {
    z-index: 1;
    position: relative;
}

/* Style for the description text in the preview/signup form */
.form-description {
    white-space: pre-line;
    line-height: 1.5;
}

/* Toast notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding: 16px 0;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-info {
    color: #666;
    font-size: 14px;
    margin-right: 16px;
}

.pagination-ellipsis {
    color: #666;
    padding: 0 4px;
}

.pagination button {
    min-width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
    transition: all 0.2s ease;
    padding: 0 8px;
}

.pagination button:hover {
    background: #f8f9fa;
    border-color: #ccc;
}

.pagination button.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.results-info {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: right;
}

/* Theme section styling */
.theme-section {
    margin: 24px 0;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
}

.theme-section label {
    margin-top: 0;
}

.theme-options {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.theme-option {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    position: relative;
    background: #f5f5f5;  /* Default theme */
}

/* Theme colors */
.theme-option[data-theme="default"] {
    background: #f5f5f5;
}

.theme-option[data-theme="darkGray"] {
    background: #434343;
}

.theme-option[data-theme="red"] {
    background: #6f0000;
}

.theme-option[data-theme="metallic"] {
    background: #dbdbdb;
}

.theme-option[data-theme="peach"] {
    background: #ed4264;
}

.theme-option:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.theme-option.active {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.3);
}

.theme-option::after {
    content: attr(title);
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    white-space: nowrap;
    color: #666;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.theme-option:hover::after {
    opacity: 1;
}

.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading.active {
    display: flex;
}

/* Profile styles */
.profile-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid white;
    transition: transform 0.2s;
    background: none;
}

.profile-button:hover {
    transform: scale(1.1);
}

.profile-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-content {
    max-width: 600px;
}

.profile-header {
    text-align: center;
    margin-bottom: 32px;
}

.profile-avatar-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.profile-avatar-container img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.change-avatar-button {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.change-avatar-button:hover {
    background: #0056b3;
}

/* Profile Settings Modal */
.profile-settings-modal .modal-content {
    display: flex;
    gap: 32px;
    max-width: 900px;
    padding: 24px;
    position: relative;
}

.profile-sidebar {
    width: 280px;
    background: #f8f9fa;
    padding: 32px;
    border-radius: 12px 0 0 12px;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    position: relative;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-name {
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 32px;
}

.profile-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-nav button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.profile-nav button:hover {
    background: #f1f3f5;
}

.profile-nav button.active {
    background: #e7f1ff;
    color: #007bff;
}

.profile-content {
    flex: 1;
    padding: 32px;
}

.profile-content h2 {
    margin: 0 0 24px 0;
    font-size: 24px;
    font-weight: 500;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
}

/* Header Layout */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 12px 0;
}

.header-left, .header-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.header-left {
    justify-content: flex-start;
}

.header-right {
    justify-content: flex-end;
}

.main-header h1 {
    margin: 0;
    flex: 2;
    text-align: center;
}

.logout-button {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}

.logout-button:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Back button in profile modal */
.back-button {
    position: absolute;
    top: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.back-button:hover {
    background: #f1f3f5;
    color: #333;
}

.back-button svg {
    stroke-width: 2px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    margin-top: 16px;
    text-align: center;
}

.email-verification-warning {
    color: #dc3545;
    font-size: 14px;
    margin-top: 4px;
}

.profile-content > div {
    display: none;
}

.profile-content > div.active {
    display: block;
}

#verificationForm {
    text-align: center;
    padding: 24px;
}

#verificationCode {
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
    width: 200px;
    margin: 16px 0;
}

.main-footer {
    text-align: center;
    padding: 24px;
    margin-top: auto;
    color: #86868b;
}

.terms-container {
    max-width: 800px;
    margin: 48px auto;
    padding: 0 24px;
}

.terms-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    display: block;
}

.terms-content {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

/* Profile form field styles */
.profile-content .form-group select,
.profile-content .form-group input {
    width: 100%;
    height: 35px;
    padding: 0 12px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Custom dropdown arrow for select in profile */
.profile-content .form-group select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;  /* Space for the arrow */
}

.profile-content .form-group input {
    padding-right: 40px;
}

.profile-content .form-group select:focus,
.profile-content .form-group input:focus {
    border-color: #0071e3;
    outline: none;
}

/* Delete modal styles */
.delete-modal {
    max-width: 400px;
    text-align: center;
    padding: 32px;
}

.delete-modal h2 {
    color: #dc3545;
    margin-bottom: 16px;
}

.delete-modal p {
    margin-bottom: 24px;
    color: #666;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.danger-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.danger-btn:hover {
    background: #c82333;
}

/* Secondary Header Layout */
.secondary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 12px 0;
    position: relative;
}

.secondary-header .header-left {
    width: auto;
    margin-right: 16px;
}

.secondary-header .header-right {
    width: auto;
    margin-left: 16px;
}

.secondary-header h2 {
    margin: 0;
    flex: 1;
    text-align: center;
    font-size: 24px;
    font-weight: 500;
}

.secondary-header #backToLists {
    margin-right: 16px;
}
