/* ═══════════════════════════════════════════════════════════════
   THE FAMILY PIRATE - RETRO HUB STYLESHEET
   A distinctive blend of 90s web nostalgia and pirate tavern
   ═══════════════════════════════════════════════════════════════ */

/* ═══ CSS VARIABLES ═══ */
:root {
    /* Pirate Color Palette */
    --crt-black: #0a0a0a;
    --pirate-green: #00ff00;
    --parchment-beige: #f5e6d3;
    --wood-brown: #8b4513;
    --treasure-gold: #ffd700;
    --retro-red: #ff0000;
    --hyperlink-blue: #0066ff;
    --dark-wood: #3d2817;
    --aged-paper: #e8dcc4;
    --rope-brown: #6b4423;
    --sea-blue: #1e3a5f;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Typography */
    --font-pixel: 'Press Start 2P', cursive;
    --font-mono: 'VT323', monospace;
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Effects */
    --shadow-heavy: 0 8px 16px rgba(0, 0, 0, 0.6);
    --shadow-medium: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.2);
    --glow-green: 0 0 10px var(--pirate-green);
    --glow-gold: 0 0 20px var(--treasure-gold);
}

/* ═══ RESET & BASE ═══ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-system);
    background: var(--crt-black);
    color: var(--parchment-beige);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ═══ PARCHMENT TEXTURE BACKGROUND ═══ */
.page-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 50%, rgba(139, 69, 19, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, #0a0a0a 0%, #1a1410 100%);
    background-size: cover;
    opacity: 0.9;
}

/* Add subtle noise texture */
.page-texture::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(139, 69, 19, 0.03) 2px, rgba(139, 69, 19, 0.03) 4px);
    opacity: 0.5;
    animation: scanlines 8s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(100px); }
}

/* ═══ CONTAINER ═══ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
    position: relative;
    z-index: 1;
}

/* ═══ HEADER & ASCII LOGO ═══ */
.site-header {
    margin-bottom: var(--spacing-xl);
    animation: fadeInDown 1s ease-out;
}

.ascii-logo {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    line-height: 1.1;
    color: var(--treasure-gold);
    text-align: center;
    background: rgba(139, 69, 19, 0.2);
    padding: var(--spacing-sm);
    border: 3px double var(--treasure-gold);
    border-radius: 4px;
    box-shadow: var(--shadow-heavy), inset 0 0 20px rgba(255, 215, 0, 0.1);
    overflow-x: auto;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    50% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.4); }
}

/* ═══ SHIP DIVIDER ═══ */
.ship-divider {
    text-align: center;
    margin: var(--spacing-md) 0;
    overflow: hidden;
}

.ship-ascii {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--sea-blue);
    display: inline-block;
    animation: bobbing 3s ease-in-out infinite;
}

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

/* ═══ WELCOME PANEL ═══ */
.welcome-panel {
    margin-bottom: var(--spacing-xl);
    animation: fadeIn 1.2s ease-out;
}

.panel-border {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.3) 0%, rgba(61, 40, 23, 0.5) 100%);
    border: 4px solid var(--wood-brown);
    border-radius: 8px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-heavy);
    position: relative;
}

.panel-border::before {
    content: '⚓';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    background: var(--crt-black);
    padding: 0 var(--spacing-sm);
}

.welcome-title {
    font-family: var(--font-pixel);
    font-size: 1.5rem;
    color: var(--treasure-gold);
    text-align: center;
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    animation: titleShine 2s ease-in-out infinite;
}

@keyframes titleShine {
    0%, 100% { color: var(--treasure-gold); }
    50% { color: #ffed4e; }
}

.welcome-text {
    font-size: 1.1rem;
    text-align: center;
    color: var(--parchment-beige);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-md);
    border-top: 2px dashed var(--wood-brown);
}

.stat-item {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--pirate-green);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--pirate-green);
    border-radius: 4px;
    box-shadow: var(--glow-green);
}

/* ═══ ISLAND MAP SECTION ═══ */
.island-map {
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-family: var(--font-pixel);
    font-size: 1.3rem;
    color: var(--treasure-gold);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.islands-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
    animation: fadeInUp 1.5s ease-out;
}

/* ═══ ISLAND CARDS ═══ */
.island-card {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.3) 0%, rgba(10, 10, 10, 0.8) 100%);
    border: 3px solid var(--wood-brown);
    border-radius: 8px;
    padding: var(--spacing-md);
    box-shadow: var(--shadow-heavy);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.island-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;
}

.island-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy), 0 0 30px rgba(255, 215, 0, 0.3);
    border-color: var(--treasure-gold);
}

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

.card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--wood-brown);
}

.card-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    animation: iconFloat 3s ease-in-out infinite;
}

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

.card-header h3 {
    font-family: var(--font-pixel);
    font-size: 1.1rem;
    color: var(--treasure-gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.card-description {
    color: var(--parchment-beige);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.card-details {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.detail-badge {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    background: rgba(0, 255, 0, 0.1);
    color: var(--pirate-green);
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--pirate-green);
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

.card-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* ═══ BUTTONS ═══ */
.btn {
    font-family: var(--font-pixel);
    font-size: 0.7rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--treasure-gold) 0%, #ff8c00 100%);
    color: var(--crt-black);
    border: 2px solid var(--treasure-gold);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ffed4e 0%, var(--treasure-gold) 100%);
    box-shadow: var(--glow-gold);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(139, 69, 19, 0.6);
    color: var(--parchment-beige);
    border: 2px solid var(--wood-brown);
}

.btn-secondary:hover {
    background: rgba(139, 69, 19, 0.8);
    border-color: var(--treasure-gold);
    color: var(--treasure-gold);
}

/* ═══ QUICK LINKS ═══ */
.quick-links {
    margin-bottom: var(--spacing-xl);
}

.links-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(139, 69, 19, 0.2);
    border: 2px solid var(--wood-brown);
    border-radius: 8px;
}

.quick-link {
    font-family: var(--font-pixel);
    font-size: 0.8rem;
    color: var(--treasure-gold);
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--wood-brown);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.quick-link:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--treasure-gold);
    transform: scale(1.05);
    box-shadow: var(--glow-gold);
}

/* ═══ NEWS PANEL ═══ */
.news-panel {
    margin-bottom: var(--spacing-xl);
}

.news-container {
    display: grid;
    gap: var(--spacing-md);
}

.news-item {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.3) 0%, rgba(10, 10, 10, 0.8) 100%);
    border-left: 4px solid var(--treasure-gold);
    padding: var(--spacing-md);
    border-radius: 4px;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
}

.news-item:hover {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.4) 0%, rgba(10, 10, 10, 0.9) 100%);
    border-left-width: 6px;
    transform: translateX(5px);
}

.news-date {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--pirate-green);
    display: block;
    margin-bottom: var(--spacing-xs);
}

.news-title {
    font-family: var(--font-pixel);
    font-size: 1rem;
    color: var(--treasure-gold);
    margin-bottom: var(--spacing-sm);
}

.news-content {
    color: var(--parchment-beige);
    line-height: 1.6;
}

/* ═══ FOOTER ═══ */
.site-footer {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 3px double var(--wood-brown);
}

.footer-divider pre {
    font-family: var(--font-mono);
    color: var(--wood-brown);
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
    font-family: var(--font-pixel);
    font-size: 0.9rem;
    color: var(--treasure-gold);
    margin-bottom: var(--spacing-sm);
}

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

.footer-section li {
    margin-bottom: var(--spacing-xs);
}

.footer-section a {
    color: var(--parchment-beige);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--treasure-gold);
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 2px solid var(--wood-brown);
    color: var(--aged-paper);
}

.footer-badges {
    margin-top: var(--spacing-md);
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.footer-badge {
    height: 31px;
    width: auto;
    image-rendering: pixelated;
    transition: transform 0.3s ease;
}

.footer-badge:hover {
    transform: scale(1.1);
}

/* ═══ MODAL ═══ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.9) 0%, rgba(10, 10, 10, 0.95) 100%);
    margin: 10% auto;
    padding: var(--spacing-lg);
    border: 4px solid var(--treasure-gold);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-close {
    color: var(--treasure-gold);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--retro-red);
}

/* ═══ ANIMATIONS ═══ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from { 
        opacity: 0; 
        transform: translateY(-30px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

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

/* ═══ RESPONSIVE DESIGN ═══ */
@media (max-width: 768px) {
    .ascii-logo {
        font-size: 0.4rem;
    }
    
    .welcome-title {
        font-size: 1.2rem;
    }
    
    .islands-container {
        grid-template-columns: 1fr;
    }
    
    .stats-bar {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        font-size: 0.6rem;
        padding: 0.6rem 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ═══ ACCESSIBILITY ═══ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══ PRINT STYLES ═══ */
@media print {
    .page-texture,
    .modal,
    .card-actions,
    .quick-links {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
