/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #013A7B;
}

.logo-icon {
    width: 32px;
    height: 32px;
    margin-right: 8px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #0272D3;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #FF6F5C;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #013A7B 0%, #0272D3 50%, #4A90E2 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('assets/images/coral-reef-bg.png') center/cover;
    opacity: 0.3;
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 50px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-text {
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Download Buttons */
.download-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

/* Preload images */
.download-btn img, .download-btn-large img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.download-btn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 确保Google Play按钮可见 */
.download-btn.google-btn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.download-btn img {
    height: 60px;
    width: auto;
    border-radius: 8px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.download-btn.apple-btn img {
    height: 58px;
}

.download-btn.google-btn img {
    height: 82px;
}

/* Phone Mockups */
.hero-phones {
    position: relative;
    height: 600px;
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.phone-mockup {
    position: relative;
    width: 320px;
    height: 640px;
    background: linear-gradient(145deg, #2c2c2c, #1a1a1a);
    border-radius: 35px;
    padding: 12px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.phone-1 {
    transform: rotateY(-10deg) rotateX(5deg);
    z-index: 3;
}

.phone-2 {
    transform: rotateY(10deg) rotateX(5deg);
    z-index: 3;
}

.phone-3 {
    display: none;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 25px;
    overflow: hidden;
    position: relative;
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 25px;
}

.phone-1:hover {
    transform: rotateY(-5deg) rotateX(2deg) translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.phone-2:hover {
    transform: rotateY(5deg) rotateX(2deg) translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

/* Features Section */
.features {
    padding: 100px 0;
    background: rgba(255, 255, 255, 0.95);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #013A7B;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(1, 58, 123, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(1, 58, 123, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(1, 58, 123, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #013A7B;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Gallery Section */
.gallery {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8fbff 0%, #e3f2fd 100%);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.gallery-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

/* Download Section */
.download-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #013A7B 0%, #0272D3 100%);
    color: white;
    text-align: center;
}

.download-section .section-title {
    color: white;
}

.download-description {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.download-buttons-large {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    align-items: center;
}

.download-btn-large img {
    height: 80px;
    width: auto;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.download-btn-large.apple-btn img {
    height: 75px;
}

.download-btn-large.google-btn img {
    height: 110px;
}

.download-btn-large:hover img {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.system-requirements {
    opacity: 0.8;
    font-size: 0.9rem;
}

.system-requirements p {
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 50px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-logo .logo-icon {
    width: 32px;
    height: 32px;
    margin-right: 8px;
    object-fit: contain;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #FF6F5C;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #888;
}

/* New SEO Sections */
.target-audiences {
    padding: 100px 0;
    background: rgba(255, 255, 255, 0.95);
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.audience-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(1, 58, 123, 0.1);
    transition: transform 0.3s ease;
    border: 1px solid rgba(1, 58, 123, 0.1);
}

.audience-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(1, 58, 123, 0.15);
}

.audience-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.how-it-works {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8fbff 0%, #e3f2fd 100%);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.step-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #013A7B, #0272D3);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.diving-guide {
    padding: 100px 0;
    background: rgba(255, 255, 255, 0.95);
}

.guide-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.guide-text h3 {
    color: #013A7B;
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
}

.guide-text h3:first-child {
    margin-top: 0;
}

.guide-keywords {
    background: linear-gradient(135deg, #013A7B, #0272D3);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    position: sticky;
    top: 2rem;
}

.guide-keywords ul {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.guide-keywords li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.faq {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8fbff 0%, #e3f2fd 100%);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.faq-item {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-5px);
}

.faq-item h3 {
    color: #013A7B;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
        line-height: 1.6;
        margin-bottom: 2rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    /* 平板尺寸下的手机显示 - 并排但更紧凑 */
    .hero-phones {
        height: 450px;
        gap: 1.5rem;
        justify-content: center;
    }
    
    .phone-mockup {
        width: 200px;
        height: 400px;
    }
    
    .phone-1 {
        transform: rotateY(-5deg) rotateX(2deg);
    }
    
    .phone-2 {
        transform: rotateY(5deg) rotateX(2deg);
    }
    
    .phone-3 {
        display: none; /* 在平板上隐藏第三个手机 */
    }
    
    .download-buttons-large {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .guide-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .guide-keywords {
        position: static;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
        line-height: 1.5;
        padding: 0 1rem;
        margin-bottom: 2rem;
    }
    
    .download-btn {
        display: inline-block;
        margin: 0.5rem;
    }
    
    .download-btn img {
        height: 50px;
        width: auto;
        max-width: 150px;
        border-radius: 8px;
    }
    
    .download-btn.apple-btn img {
        height: 48px;
    }
    
    .download-btn.google-btn img {
        height: 65px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    /* 小屏手机：隐藏手机mockup */
    .hero-phones {
        display: none;
    }
    
    /* 进一步优化下载按钮 */
    .download-buttons {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        justify-content: center;
        margin: 2rem 0;
    }
}

/* 超小屏幕优化 (iPhone SE等) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }
    
    .hero-phones {
        display: none; /* 超小屏也隐藏手机 */
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    /* 确保下载按钮在超小屏上可见 */
    .download-buttons {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        margin: 1.5rem 0;
    }
    
    .download-btn img {
        height: 45px;
    }
    
    .download-btn.apple-btn img {
        height: 43px;
    }
    
    .download-btn.google-btn img {
        height: 58px;
    }
}