* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.flags-row {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    padding: 0.3rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    animation: wave 3s ease-in-out infinite;
    line-height: 1.2;
    overflow: hidden;
    white-space: nowrap;
}

@keyframes wave {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-2px); }
}

header h1 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    padding: 0 0.5rem;
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
}

#auth-buttons button,
#user-info button {
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    color: white;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#auth-buttons button:hover,
#user-info button:hover {
    background: white;
    color: #667eea;
}

/* Fullscreen Map Layout */
#fullscreen-map {
    position: fixed;
    top: var(--header-height, 120px);
    left: 0;
    width: 100vw;
    height: calc(100vh - var(--header-height, 120px));
    z-index: 1;
}

#hero {
    text-align: center;
    padding: 3rem 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

#hero h2 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

#hero p {
    font-size: 1.2rem;
    color: #666;
}

#world-map {
    text-align: center;
    margin-bottom: 3rem;
}

#world-map h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 2rem;
}

#map-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 2rem;
    overflow: hidden;
}

#leaflet-map {
    width: 100%;
    height: 100%;
    border: none;
    background-color: rgb(180, 210, 221); /* Ocean blue background */
}

/* Map Overlay UI */
#map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

#map-overlay > * {
    pointer-events: auto;
}

/* Top Panel */
#top-panel {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    max-width: 500px;
    width: 90%;
}

#hero-compact {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2.5rem 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: center;
    backdrop-filter: blur(10px);
}

#hero-compact.hidden {
    display: none;
}

#close-hero-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 24px;
    height: 24px;
    transition: color 0.2s;
}

#close-hero-btn:hover {
    color: #333;
}

#hero-compact h2 {
    font-size: 1.3rem;
    color: #667eea;
    margin-bottom: 0.3rem;
}

#hero-compact p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Latest Sales Ticker */
#latest-sales-ticker {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 1002;
    max-width: 90vw;
    overflow: hidden;
}

.ticker-label {
    color: #ffc107;
    font-weight: bold;
    font-size: 0.85rem;
    white-space: nowrap;
}

#ticker-content {
    display: flex;
    gap: 20px;
    overflow: hidden;
    animation: ticker-scroll 20s linear infinite;
}

#ticker-content:hover {
    animation-play-state: paused;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s;
}

.ticker-item:hover {
    color: #ffc107;
}

.ticker-item .sold-badge {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.ticker-item .buyer-name {
    color: #67eea;
    font-weight: 500;
}

.ticker-item .country-name {
    font-weight: bold;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* SOLD badge - inline after name */
.sold-badge {
    display: inline-block;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 2px 6px;
    font-size: 0.6em;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 3px;
    text-transform: uppercase;
    margin-left: 6px;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

.country-card.sold-card {
    position: relative;
}

/* Pending state styling */
.country-card.pending-card {
    position: relative;
    opacity: 0.85;
    border: 2px dashed #ffc107;
}

.pending-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #333;
    padding: 2px 6px;
    font-size: 0.6em;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 3px;
    text-transform: uppercase;
    margin-left: 6px;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

/* Floating Cart */
#floating-cart {
    position: absolute;
    top: 140px;
    right: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    z-index: 1001;
}

#cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

#cart-header h3 {
    margin: 0;
    color: #333;
}

#toggle-cart {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
}

#cart-content {
    padding: 1rem;
}

#cart-items {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s, transform 0.1s;
}

.cart-item button:hover {
    background: #c82333;
    transform: scale(1.05);
}

.cart-item button:active {
    transform: scale(0.95);
}

/* Bottom Panel */
#bottom-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 1001;
}

#countries-toggle {
    text-align: center;
    margin-bottom: 1rem;
}

#show-countries-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

#show-countries-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.6);
}

#countries-drawer {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    max-height: 300px;
    overflow-y: auto;
}

#countries-drawer h3 {
    text-align: center;
    color: #333;
    margin-bottom: 1rem;
}

#countries-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.country-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.country-card:hover {
    transform: translateY(-3px);
}

.country-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.country-card .price {
    font-size: 1.4rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.8rem;
}

.country-card button {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.country-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.country-card button:disabled {
    background: #ccc !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.country-card .owner {
    color: #666;
    font-style: italic;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    header {
        padding: 0.5rem 0;
    }

    .flags-row {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
        padding: 0.2rem;
        letter-spacing: -2px;
    }

    header h1 {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
        line-height: 1.2;
    }

    nav {
        padding: 0 0.5rem;
    }

    #auth-buttons button,
    #user-info button {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        margin: 0 0.2rem;
    }

    .user-menu-button {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    #fullscreen-map {
        top: var(--header-height, 100px);
        height: calc(100vh - var(--header-height, 100px));
    }

    #hero-compact {
        padding: 0.6rem 0.8rem;
    }

    #hero-compact h2 {
        font-size: 1rem;
    }

    #hero-compact p {
        font-size: 0.8rem;
    }

    #top-panel {
        top: 10px;
        width: 95%;
    }

    #floating-cart {
        width: calc(100vw - 20px);
        right: 10px;
        top: 100px;
    }

    #countries-container {
        grid-template-columns: 1fr;
    }

    #countries-drawer {
        max-height: 250px;
    }

    #country-name {
        font-size: 1.5rem;
    }

    #country-price {
        font-size: 1.3rem;
    }

    .deal-button {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    /* Info dropdown mobile */
    #info-dropdown {
        position: static;
        margin-left: 5px;
    }

    .info-menu-button {
        padding: 6px 10px;
        font-size: 16px;
    }

    #info-dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 20px 20px 0 0;
        min-width: unset;
        max-height: 70vh;
        overflow-y: auto;
        transform: translateY(100%);
    }

    #info-dropdown-menu.show {
        transform: translateY(0);
    }

    #info-dropdown-menu .dropdown-item {
        padding: 16px 20px;
        font-size: 16px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .flags-row {
        font-size: 1rem;
        letter-spacing: -3px;
    }

    header h1 {
        font-size: 0.95rem;
    }

    #auth-buttons button,
    #user-info button {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    .user-menu-button {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .user-menu-button .dropdown-arrow {
        display: none;
    }

    #hero-compact h2 {
        font-size: 0.9rem;
    }

    #hero-compact p {
        font-size: 0.75rem;
    }
}

.map-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    pointer-events: none;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Hide tooltips on touch devices when modal is open */
@media (hover: none) and (pointer: coarse) {
    .map-tooltip {
        opacity: 0;
        transition: opacity 0.2s ease;
    }
}

#countries-grid h3 {
    text-align: center;
    font-size: 2rem;
    color: #333;
    margin-bottom: 2rem;
}

#countries-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.country-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.country-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.country-card h4 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.country-card .price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 1rem;
}

.country-card .owner {
    color: #666;
    font-style: italic;
    margin-bottom: 1rem;
}

.country-card button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.country-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.country-card button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#cart {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-top: 2rem;
}

#cart h3 {
    color: #333;
    margin-bottom: 1rem;
}

#checkout-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

#checkout-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

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

.modal-content {
    background-color: white;
    margin: auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

form input {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.3);
}

form input:invalid {
    border-color: #dc3545;
}

form input:valid {
    border-color: #28a745;
}

form button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* OAuth Buttons */
.oauth-buttons {
    margin-bottom: 1.5rem;
}

.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
}

.oauth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.google-btn {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: white;
    border-color: #4285f4;
}

.google-btn:hover {
    box-shadow: 0 5px 15px rgba(66, 133, 244, 0.4);
}

.facebook-btn {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    color: white;
    border-color: #1877f2;
}

.facebook-btn:hover {
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.4);
}

.oauth-icon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.divider span {
    background: white;
    padding: 0 1rem;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

/* Country Info Modal */
#country-info-modal .modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

#country-image-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    background: #f0f0f0;
}

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

#country-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #667eea;
}

#country-name {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

#country-price {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 1rem;
}

#country-description {
    background: rgba(102, 126, 234, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 1.1rem;
}

#country-description h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

#country-description p {
    margin-bottom: 1rem;
}

#country-owner-info {
    background: rgba(40, 167, 69, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

#country-owner-info h3 {
    color: #28a745;
    margin-bottom: 1rem;
}

#owner-description-input {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    resize: vertical;
}

#owner-description-input:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.3);
}

.deal-button {
    width: 100%;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 1.5rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.3rem;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.deal-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.6);
}

.deal-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#edit-description-btn, #save-description-btn, #cancel-edit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    margin: 0.5rem 0.5rem 0 0;
    transition: all 0.3s ease;
}

#edit-description-btn:hover, #save-description-btn:hover, #cancel-edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#cancel-edit-btn {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 10000;
    max-width: 400px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-left: 4px solid #667eea;
}

.toast-show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.toast-message {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    margin-left: 1rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #333;
}

.toast-success {
    border-left-color: #28a745;
}

.toast-error {
    border-left-color: #dc3545;
}

.toast-warning {
    border-left-color: #ffc107;
}

.toast-info {
    border-left-color: #17a2b8;
}

@media (max-width: 768px) {
    .toast {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .toast-show {
        transform: translateY(0);
    }
    
    main {
        padding: 1rem;
    }
    
    #hero h2 {
        font-size: 2rem;
    }
    
    #countries-container {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* User Dropdown Styles */
#user-dropdown {
    position: relative;
    display: inline-block;
}

.user-menu-button {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.user-menu-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.user-icon {
    font-size: 1.2rem;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.user-menu-button.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
    gap: 0.75rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item:first-child {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.dropdown-item:last-child {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.dropdown-icon {
    font-size: 1.1rem;
}

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 0.5rem 0;
}

/* Large Modal Styles */
.large-modal {
    width: 90%;
    max-width: 800px;
}

.extra-large-modal {
    width: 95%;
    max-width: 1200px;
}

/* Your Countries Modal */
#owned-countries-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

#marketplace-countries-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

#manage-sales-countries-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.owned-country-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.owned-country-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.country-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.country-card-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
}

.country-card-flag {
    font-size: 2rem;
}

.country-card-info {
    margin-bottom: 1rem;
}

.country-card-price {
    color: #667eea;
    font-weight: bold;
    font-size: 1.1rem;
}

.country-card-purchased {
    color: #6c757d;
    font-size: 0.9rem;
}

.country-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* Marketplace Country Cards */
.marketplace-country-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.marketplace-country-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.marketplace-country-card .country-card-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 0.5rem;
}

.marketplace-country-card .country-card-seller {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.marketplace-country-card .country-card-listed {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.marketplace-country-card .country-card-description {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 8px;
    font-style: italic;
    color: #495057;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.buy-country-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.buy-country-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.sell-btn {
    background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%);
    color: #212529;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sell-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

.remove-sale-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-sale-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* Manage Sales Country Cards */
.manage-sales-country-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.manage-sales-country-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.manage-sales-country-card .country-sale-status {
    margin: 0.5rem 0;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.manage-sales-country-card .country-sale-description {
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 6px;
    font-style: italic;
    font-size: 0.85rem;
    color: #495057;
    margin-top: 0.25rem;
}

.list-for-sale-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.list-for-sale-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.remove-from-sale-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.remove-from-sale-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.edit-sale-btn {
    background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%);
    color: #212529;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.edit-sale-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.edit-country-btn {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.edit-country-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.view-country-btn {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid #667eea;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.view-country-btn:hover {
    background: #667eea;
    color: white;
}

/* Country Editor Styles */
.editor-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.editor-section h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

/* Image Upload Section */
.image-upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

#current-image-preview {
    background: #fff;
    border: 2px dashed #ddd;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease;
}

#current-image-preview:hover {
    border-color: #667eea;
}

#country-image-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#no-image-placeholder {
    text-align: center;
    color: #6c757d;
}

.upload-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.upload-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.upload-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.remove-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.remove-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.upload-help {
    background: rgba(102, 126, 234, 0.1);
    padding: 1rem;
    border-radius: 10px;
    color: #667eea;
    font-size: 0.9rem;
    text-align: center;
}

/* Editor Actions */
.editor-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 2rem 0;
}

.save-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.save-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

.cancel-btn {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.4);
}

/* Image Cropper Styles */
.cropper-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.cropper-canvas-container {
    position: relative;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1rem;
    min-height: 500px;
    /* Remove centering to maintain coordinate accuracy */
    overflow: hidden;
}

#cropper-canvas,
#border-overlay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    /* Remove transform to maintain coordinate accuracy */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: move;
}

#border-overlay-canvas {
    pointer-events: none;
    z-index: 10;
}

.cropper-controls {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cropper-controls h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.control-group input[type="range"] {
    width: 100%;
    margin-bottom: 0.5rem;
}

.control-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.control-buttons button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.control-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.template-section {
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
}

.template-section h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1rem;
}

#upload-template-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 1rem;
}

#upload-template-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.4);
}

.template-help {
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
    line-height: 1.4;
}

.cropper-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Responsive Design for New Components */
@media (max-width: 768px) {
    .large-modal,
    .extra-large-modal {
        width: 95%;
        margin: 5% auto;
    }
    
    .image-upload-section,
    .cropper-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    #owned-countries-list {
        grid-template-columns: 1fr;
    }
    
    .editor-actions,
    .cropper-actions {
        flex-direction: column;
    }
    
    .country-card-actions {
        flex-direction: column;
    }
    
    .dropdown-menu {
        right: auto;
        left: 0;
    }
}

/* Custom Country Image Overlays */
.custom-country-overlay {
    pointer-events: none;
    z-index: 200;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.custom-country-overlay:hover {
    opacity: 0.9;
}

/* Ensure clip paths work across browsers */
.country-clip-svg {
    overflow: visible;
}

/* Map overlay container adjustments */
#leaflet-map .leaflet-overlay-pane {
    z-index: 200;
}

#leaflet-map .leaflet-image-layer {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

/* Settings Modal Styles */
#settings-content h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

#user-profile-section {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

#user-profile-section h3 {
    margin-bottom: 1rem;
    color: #667eea;
}

#user-profile-section p {
    margin: 0.5rem 0;
}

#danger-zone {
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 1.5rem;
    background: #fff5f5;
}

#danger-zone h3 {
    color: #dc3545;
    margin-bottom: 1rem;
}

#danger-zone ul {
    margin: 1rem 0 1.5rem 1.5rem;
    color: #666;
}

#danger-zone li {
    margin: 0.5rem 0;
}

#delete-account-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#delete-account-form input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.danger-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.3s;
}

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

/* Info/Legal Dropdown */
#info-dropdown {
    position: relative;
    margin-left: 10px;
}

.info-menu-button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s;
}

.info-menu-button:hover {
    background: rgba(255, 255, 255, 0.25);
}

#info-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    min-width: 200px;
    z-index: 1000;
}

#info-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#info-menu-backdrop {
    display: none;
}

#info-menu-backdrop.show {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* ============================================
   COUNTRY LIST VIEW STYLES
   ============================================ */

/* View Toggle Button */
#view-toggle-container {
    position: fixed;
    top: calc(var(--header-height, 120px) + 15px);
    left: 60px; /* Offset to avoid Leaflet zoom controls */
    z-index: 1001;
}

#view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    padding: 10px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#view-toggle-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

#view-toggle-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#view-icon {
    font-size: 16px;
}

/* Country List View Container */
#country-list-view {
    position: fixed;
    top: var(--header-height, 120px);
    left: 0;
    right: 0;
    bottom: 0;
    background: #f4f4f4;
    overflow-y: auto;
    z-index: 500;
    padding: 0;
}

/* List Header */
.list-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.list-header h2 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.5rem;
    text-align: center;
}

.list-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

/* Search Box */
.search-box {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
}

/* Sort Controls */
.sort-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-controls label {
    font-weight: 600;
    color: #666;
    font-size: 14px;
}

.sort-controls select {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    background: white;
    transition: border-color 0.3s;
}

.sort-controls select:focus {
    outline: none;
    border-color: #667eea;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 15px;
}

.filter-controls label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    user-select: none;
}

.filter-controls input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

/* List Stats */
.list-stats {
    text-align: center;
    padding-top: 10px;
    color: #888;
    font-size: 14px;
}

/* Country Grid */
#country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 25px;
    max-width: 1600px;
    margin: 0 auto;
}

/* List Country Card */
.list-country-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.list-country-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.list-country-card.sold {
    opacity: 0.85;
}

/* Sold Overlay */
.list-country-card .sold-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    border-radius: 20px;
    text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.4);
    z-index: 10;
}

/* Card Flag Area */
.list-card-flag {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
}

/* Card Content */
.list-card-content {
    padding: 15px 20px 20px;
}

.list-card-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-card-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 10px;
}

.list-card-price.contact-price {
    font-size: 1rem;
    color: #856404;
    background: #fff3cd;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
}

.list-card-status {
    font-size: 0.85rem;
    color: #666;
}

.list-card-status .owner-name {
    color: #28a745;
    font-weight: 600;
}

/* Card Button */
.list-card-btn {
    width: 100%;
    padding: 12px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.list-card-btn:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

.list-country-card.sold .list-card-btn {
    background: #6c757d;
}

/* Empty State */
.list-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.list-empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #666;
}

/* Mobile Responsive for List View */
@media (max-width: 768px) {
    #view-toggle-container {
        top: calc(var(--header-height, 100px) + 10px);
        left: 55px; /* Offset for zoom controls on mobile */
    }

    #view-toggle-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    #view-text {
        display: none;
    }

    .list-header {
        padding: 15px;
    }

    .list-header h2 {
        font-size: 1.2rem;
    }

    .list-controls {
        flex-direction: column;
        gap: 10px;
    }

    .search-box {
        max-width: none;
        width: 100%;
    }

    .sort-controls, .filter-controls {
        width: 100%;
        justify-content: center;
    }

    #country-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        padding: 15px;
        gap: 15px;
    }

    .list-card-flag {
        height: 60px;
        font-size: 2.5rem;
    }

    .list-card-content {
        padding: 12px 15px 15px;
    }

    .list-card-name {
        font-size: 1.1rem;
    }

    .list-card-price {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    #country-grid {
        grid-template-columns: 1fr;
    }
}