/* Pirate's Cove Game Center - Pirate Theme CSS */

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

body {
    font-family: 'Cinzel', serif;
    background: linear-gradient(135deg, #1a0f0a 0%, #2c1810 50%, #0f0a05 100%);
    color: #d4af37;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
.pirate-nav {
    background: linear-gradient(90deg, #0a0502 0%, #1a0f0a 50%, #0a0502 100%);
    border-bottom: 3px solid #8B4513;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo h1 {
    font-family: 'Pirata One', cursive;
    color: #d4af37;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #8B4513;
    transition: width 0.3s ease;
}

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

/* Hero Section */
.hero {
    margin-top: 80px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    scroll-margin-top: 90px; /* prevent header overlap when anchored */
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-family: 'Pirata One', cursive;
    font-size: 4rem;
    color: #d4af37;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    background: linear-gradient(45deg, #d4af37, #ffd700, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #b8860b;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.cta-button {
    background: linear-gradient(45deg, #8B4513, #A0522D);
    color: #d4af37;
    border: 2px solid #d4af37;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.4);
}

.cta-button:hover {
    background: linear-gradient(45deg, #A0522D, #8B4513);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 520px;
}

.pirate-ship {
    width: 300px;
    height: 200px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 60"><path d="M10 50 Q20 30 40 35 L60 35 Q80 30 90 50 L85 55 L15 55 Z" fill="%23654321"/><rect x="45" y="15" width="10" height="20" fill="%23654321"/><path d="M40 15 L60 15 L50 5 Z" fill="%23000000"/></svg>') no-repeat center;
    background-size: contain;
    animation: float 3s ease-in-out infinite;
}

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

/* Ad Sections */
.ad-banner, .ad-square {
    display: flex;
    justify-content: center;
    margin: 2rem auto;
    max-width: 100%;
}

.ad-container {
    background: rgba(139, 69, 19, 0.1);
    border: 2px dashed #8B4513;
    border-radius: 8px;
    padding: 1rem;
    margin: 2rem auto;
    max-width: 400px;
}

/* Games Section */
.games-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    scroll-margin-top: 90px;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: 'Pirata One', cursive;
    font-size: 3rem;
    color: #d4af37;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.section-header p {
    font-size: 1.2rem;
    color: #b8860b;
}

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

.game-card {
    background: linear-gradient(145deg, #1a0f0a, #0a0502);
    border: 2px solid #8B4513;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.game-card:hover::before {
    left: 100%;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.2);
    border-color: #d4af37;
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.game-card h3 {
    font-family: 'Pirata One', cursive;
    font-size: 1.8rem;
    color: #d4af37;
    margin-bottom: 1rem;
}

.game-card p {
    color: #b8860b;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.play-btn {
    background: linear-gradient(45deg, #8B4513, #A0522D);
    color: #d4af37;
    border: 2px solid #d4af37;
    padding: 0.8rem 2rem;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.play-btn:hover {
    background: linear-gradient(45deg, #d4af37, #ffd700);
    color: #0a0502;
    transform: scale(1.05);
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    scroll-margin-top: 90px;
}

.feature-card {
    background: linear-gradient(145deg, #1a0f0a, #0a0502);
    border: 2px solid #8B4513;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-family: 'Pirata One', cursive;
    font-size: 1.5rem;
    color: #d4af37;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #b8860b;
}

/* Footer */
.pirate-footer {
    background: linear-gradient(90deg, #0a0502 0%, #1a0f0a 50%, #0a0502 100%);
    border-top: 3px solid #8B4513;
    color: #b8860b;
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

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

.footer-section h4 {
    font-family: 'Pirata One', cursive;
    color: #d4af37;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

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

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

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

.footer-section a:hover {
    color: #d4af37;
}

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

.social-links a {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.2);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #8B4513;
    color: #8B4513;
}

/* Creator credit */
.creator-credit {
    margin-top: .5rem;
    color: #b8860b;
    font-size: 0.95rem;
}
.creator-credit a {
    color: #d4af37;
    text-decoration: none;
    border-bottom: 1px dotted rgba(212,175,55,0.6);
}
.creator-credit a:hover {
    color: #ffd700;
    border-bottom-color: rgba(255,215,0,0.9);
}

/* Sticky Ad */
.sticky-ad {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    height: 250px;
    background: rgba(139, 69, 19, 0.9);
    border: 2px solid #d4af37;
    border-radius: 10px;
    z-index: 999;
    display: none;
}

/* --- Auth Modal --- */
.hidden { display: none !important; }
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
}
.auth-modal.show { display: block; }
.auth-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(2px);
}
.auth-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 420px;
    background: linear-gradient(145deg, #1a0f0a, #0a0502);
    border: 2px solid #8B4513;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    padding: 1rem 1.25rem 1.25rem;
    color: #d4af37;
}
.auth-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    color: #d4af37;
    font-size: 24px;
    cursor: pointer;
    body { 
      background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%231a0f0a"/><path d="M0 0L100 100M100 0L0 100" stroke="%232c1810" stroke-width="0.5"/></svg>'), 
                  radial-gradient(1200px 700px at 50% 0%, #2c1810 0%, #1a0f0a 60%, #0f0a05 100%); 
      font-family: 'Cinzel', serif;
    border: 2px solid #d4af37;
    padding: .35rem .7rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}
.auth-msg { color: #b8860b; text-align: center; margin-top: .5rem; }

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .sticky-ad {
        position: relative;
        bottom: auto;
        right: auto;
        width: 100%;
        margin: 1rem auto;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .game-card {
        padding: 1.5rem;
    }
}
