/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* 為固定 header 預留空間 */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.2rem;
}

.tagline {
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #0891b2;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    color: white;
    text-align: center;
    scroll-margin-top: 80px; /* 額外的滾動邊距 */
}

.hero-content {
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Map Container */
.map-container {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
}

#world-map {
    height: 500px;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.map-legend {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    gap: 2rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.legend-marker {
    width: 12px;
    height: 12px;
    background: #0891b2;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(8, 145, 178, 0.5);
}

/* Portfolio Section */
.portfolio-section {
    padding: 5rem 0;
    background: white;
    scroll-margin-top: 80px; /* 額外的滾動邊距 */
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
}

/* Continent Filters */
.continent-filters {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.primary-filters-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 0.5rem;
}

.continent-filters-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid #0891b2;
    background: transparent;
    color: #0891b2;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(8, 145, 178, 0.3);
}

/* Developed Button Special Styling */
.developed-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: 2px solid #f59e0b;
    color: white;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    position: relative;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    transition: all 0.3s ease;
}

.developed-btn:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    border-color: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.developed-btn.active {
    background: linear-gradient(135deg, #b45309, #92400e);
    border-color: #b45309;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(180, 83, 9, 0.5);
}

.developed-btn i {
    margin-right: 0.5rem;
    color: #fbbf24;
}

.developed-btn.active i {
    color: #fcd34d;
}

.developed-count {
    margin-left: 0.5rem;
    font-weight: 700;
    opacity: 0.9;
}

/* Domain Grid */
.domains-grid {
    display: block;
}

.continent-group {
    opacity: 1;
    transition: all 0.5s ease;
    width: 100%;
    margin-bottom: 3rem;
    position: relative;
}

.continent-group:first-of-type:not(.hidden) {
    margin-top: 0;
}

/* 確保第一個可見的洲別從頂部開始 */
.continent-group:not(.hidden):first-child,
.continent-group:not(.hidden):nth-child(1) {
    margin-top: 0 !important;
}

.continent-group.hidden {
    display: none !important;
}

.continent-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.continent-title i {
    color: #0891b2;
    font-size: 1.5rem;
}

.domains-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    align-content: start;
    justify-content: start;
}

/* Domain Cards */
.domain-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(8, 145, 178, 0.1);
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.domain-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #0891b2, #06b6d4);
}

.domain-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(8, 145, 178, 0.2);
}

.domain-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

/* Special styling for StVincentandtheGrenadines.com only */
.domain-card.long-domain-name .domain-name {
    font-size: 1.2rem;
    line-height: 1.47;
    letter-spacing: -0.3px;
    word-break: keep-all;
    overflow-wrap: break-word;
    hyphens: none;
}

.domain-location {
    font-size: 1rem;
    color: #0891b2;
    font-weight: 500;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    line-height: 1.4;
}

.domain-type {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
}

/* 為未開發域名添加佔位空間，確保高度一致 */
.domain-card:not(.developed)::after {
    content: '';
    display: block;
    height: 2.6rem; /* 與 visit-site 按鈕相同的高度 */
    margin-top: auto;
}

/* Developed Domain Styles */
.domain-card.developed {
    position: relative;
    background: linear-gradient(135deg, #f0fdff 0%, #ffffff 100%);
    border: 2px solid #0891b2;
    box-shadow: 0 15px 40px rgba(8, 145, 178, 0.15);
}

.domain-card.developed::before {
    background: linear-gradient(135deg, #22d3ee, #0891b2);
    height: 6px;
}

.domain-card.developed:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 60px rgba(8, 145, 178, 0.25);
}

.developed-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.developed-badge-inline i {
    font-size: 0.6rem;
}

.domain-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.domain-link:hover {
    color: inherit;
}

.visit-site {
    margin-top: auto;
    padding: 0.8rem 1rem;
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    color: white;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.domain-card.developed:hover .visit-site {
    opacity: 1;
    transform: translateY(0);
}

.visit-site:hover {
    background: linear-gradient(135deg, #0e7490, #0891b2);
    transform: translateY(-2px);
}

.visit-site i {
    font-size: 0.8rem;
}

/* Custom Map Popup Styles */
.custom-popup {
    font-family: 'Inter', sans-serif;
}

.custom-popup .leaflet-popup-content-wrapper {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
    max-width: 280px !important;
    min-width: 200px !important;
}

.custom-popup .leaflet-popup-content {
    margin: 15px;
    font-size: 14px;
    line-height: 1.4;
    max-width: 250px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.custom-popup .leaflet-popup-tip {
    background: #dc2626;
}

.popup-domain-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
}

.popup-location {
    opacity: 0.9;
    margin-bottom: 3px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.popup-type {
    font-size: 12px;
    opacity: 0.8;
    font-style: italic;
    word-wrap: break-word;
    overflow-wrap: break-word;
}


.popup-visit-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #ffffff;
    color: #dc2626;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    transition: all 0.3s ease;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.popup-visit-link:hover {
    background: #f8fafc;
    color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Development Section */
.development-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    scroll-margin-top: 80px; /* 額外的滾動邊距 */
}

.development-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.development-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(8, 145, 178, 0.1);
    position: relative;
    overflow: hidden;
}

.development-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #0891b2, #06b6d4);
}

.development-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(8, 145, 178, 0.2);
}

.development-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
    box-shadow: 0 10px 30px rgba(8, 145, 178, 0.3);
}

.development-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.development-card p {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
}

/* Development Stats */
.development-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    padding: 3rem 2rem;
    border-radius: 20px;
    color: white;
    text-align: center;
    margin-bottom: 4rem;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sellers Contact Section */
.sellers-contact {
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid rgba(8, 145, 178, 0.1);
    scroll-margin-top: 80px; /* 額外的滾動邊距 */
}

.sellers-contact h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sellers-contact > p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f0fdff;
    border-radius: 15px;
    border: 1px solid rgba(8, 145, 178, 0.1);
}

.contact-item i {
    color: #0891b2;
    font-size: 1.2rem;
    min-width: 20px;
}

.contact-item span {
    color: #555;
    font-weight: 500;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(8, 145, 178, 0.3);
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(8, 145, 178, 0.4);
    color: white;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #667eea;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #34495e;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #0891b2;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .map-container {
        padding: 1rem;
    }
    
    #world-map {
        height: 400px;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .primary-filters-row {
        gap: 1.5rem;
    }
    
    .continent-filters-row {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .developed-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .domains-list {
        grid-template-columns: 1fr;
    }
    
    .domain-card {
        padding: 1.5rem;
    }
    
    .continent-title {
        font-size: 1.5rem;
    }
    
    .development-grid {
        grid-template-columns: 1fr;
    }
    
    .development-card {
        padding: 2rem 1.5rem;
    }
    
    .development-stats {
        grid-template-columns: repeat(2, 1fr);
        padding: 2rem 1rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .sellers-contact {
        padding: 2rem 1.5rem;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .map-container {
        padding: 0.8rem;
    }
    
    #world-map {
        height: 300px;
    }
    
    .portfolio-section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .primary-filters-row {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
        width: 100%;
    }
    
    .continent-filters-row {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .filter-btn {
        width: 200px;
    }
    
    .developed-btn {
        width: 200px;
    }
    
    .development-section {
        padding: 2rem 0;
    }
    
    .development-stats {
        grid-template-columns: 1fr;
        padding: 1.5rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .development-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .sellers-contact {
        padding: 1.5rem 1rem;
    }
    
    .sellers-contact h3 {
        font-size: 1.5rem;
    }
    
    .contact-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Hide Leaflet Attribution */
.leaflet-control-attribution {
    display: none !important;
}

.leaflet-bottom.leaflet-right {
    display: none !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0e7490, #0891b2);
}
m 請修正 