/* 
================================================================
GLOBAL DESIGN SYSTEM & STYLES
================================================================
*/

:root {
    --gold: #FFD700;
    --gold-glow: rgba(255, 215, 0, 0.3);
    --ocean-blue: #0077be;
    --deep-sea: #004466;
    --parchment: #f4e4bc;
    --ink: #2b1d0e;
    --red-line: #cc0000;
    --glass-bg: rgba(11, 14, 20, 0.95);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    --transition-smooth: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);

    /* Page Specific Colors */
    --accent: #ff4d4d;
    --marine-blue: #002b5c;
    --justice-red: #cc0000;
    --rev-green: #1a3d34;
    --crimson: #a30000;
    --luffy-red: #ff3e3e;
    --shanks-red: #cc0000;
    --teach-purple: #4b0082;
    --wb-blue: #00aaff;
    --kaido-purple: #5c00a3;
    --bm-pink: #ff69b4;
}

/* 3D GRAND LINE EXPERIENCE */
#grand-line-3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.experience-overlay {
    background: transparent !important;
}

/* RPG MAP SYSTEM */
.map-container {
    width: 100%;
    height: 600px;
    background: url('assets/onepieceworldmap.webp');
    background-size: cover;
    background-position: center;
    border-radius: 30px;
    position: relative;
    border: 5px solid #4a3721;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.map-point {
    position: absolute;
    width: 25px;
    height: 25px;
    background: var(--red-line);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 15px var(--red-line);
    animation: pulse-red 2s infinite;
    z-index: 10;
}

.map-point:hover::after {
    content: attr(data-location);
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--parchment);
    color: var(--ink);
    padding: 5px 15px;
    border-radius: 5px;
    white-space: nowrap;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    font-size: 0.8rem;
}

@keyframes pulse-red {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(204, 0, 0, 0.7);
    }

    70% {
        transform: scale(1.2);
        box-shadow: 0 0 0 15px rgba(204, 0, 0, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(204, 0, 0, 0);
    }
}

/* COMBAT MODE INTERFACE */
.combat-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 3000;
    background: var(--red-line);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 4px solid var(--gold);
    font-size: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: var(--transition-smooth);
}

.combat-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    background: var(--gold);
    color: var(--red-line);
}

.in-combat .reveal-node {
    animation: shake 0.5s infinite !important;
}

@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    100% {
        transform: translate(1px, 1px) rotate(0deg);
    }
}

/* GLOBAL STYLES */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: transparent;
    color: #e0e0e0;
    line-height: 1.8;
    background-image: linear-gradient(rgba(11, 14, 20, 0.4), rgba(11, 14, 20, 0.6)), url('https://www.transparenttextures.com/patterns/old-map.png');
    background-attachment: fixed;
    overflow-x: hidden;
}

/* ANIMATIONS */
@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

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

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.reveal-node {
    opacity: 0;
    transition: var(--transition-smooth);
}

.reveal-node.visible {
    opacity: 1;
    animation: reveal 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* HEADER & NAVIGATION */
header {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--gold);
    padding: 12rem 1rem;
    text-align: center;
    border-bottom: none;
    box-shadow: none;
    position: relative;
    overflow: visible;
    z-index: 10;
}

/* Header Overrides */
.marines-page header {
    background: linear-gradient(to bottom, var(--marine-blue), #0b0e14);
    color: white;
    border-bottom: 5px solid var(--justice-red);
}

.revolutionary-page header {
    background: linear-gradient(to bottom, var(--rev-green), #0b0e14);
    border-bottom: 3px solid #2d5a4c;
}

header h1 {
    font-family: 'Pirata One', cursive;
    font-size: 6rem;
    margin: 0;
    letter-spacing: 15px;
    text-shadow: 0 0 40px var(--gold-glow);
    animation: floating 4s ease-in-out infinite;
}

.marines-page header h1 {
    font-family: 'Cinzel', serif;
    font-size: 5rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

nav {
    background: rgba(11, 14, 20, 0.6);
    padding: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 2000;
    text-align: center;
    border-bottom: 1px solid var(--red-line);
    transition: var(--transition-smooth);
}

.marines-page nav {
    background: rgba(0, 43, 92, 0.9);
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.8rem 2rem;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    opacity: 0.7;
}

nav a:hover {
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition-smooth: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    color: var(--gold);
    text-shadow: 0 0 20px var(--gold);
    opacity: 1;
    letter-spacing: 5px;
}

/* CONTAINER & LAYOUT */
.container {
    max-width: 1100px;
    margin: 4rem auto;
    border-radius: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 5rem;
    box-shadow: var(--glass-shadow);
    position: relative;
    z-index: 5;
}

/* Wide Container for Grids */
.wide-container {
    max-width: 1400px;
    padding: 0 3rem;
    background: transparent;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
}

/* TYPOGRAPHY */
h2,
h3,
h4 {
    font-family: 'Pirata One', cursive;
    color: var(--gold);
    letter-spacing: 4px;
}

h2 {
    font-size: 3.5rem;
    margin-top: 4rem;
    text-align: center;
}

h3 {
    font-size: 2.5rem;
    margin-top: 3.5rem;
}

h4 {
    font-size: 2rem;
    color: var(--red-line);
}

.marines-page h2,
.marines-page h3 {
    font-family: 'Cinzel', serif;
}

p {
    font-size: 1.15rem;
    font-weight: 300;
    color: #ccc;
}

ul {
    list-style: none;
    padding: 0;
}

li {
    background: rgba(255, 255, 255, 0.05);
    margin: 1.5rem 0;
    padding: 2rem;
    border-radius: 20px;
    border-left: 5px solid var(--ocean-blue);
    transition: var(--transition-smooth);
}

li:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.02) translateX(15px);
    border-left-color: var(--gold);
}

.yonko-list li {
    padding: 0;
}

.yonko-link {
    display: block;
    padding: 2rem;
    color: var(--gold);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.yonko-link:hover {
    color: white;
    text-shadow: 0 0 15px var(--gold);
}

/* HERO SECTION */
.hero {
    height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.85)), url('https://w0.peakpx.com/wallpaper/411/735/HD-wallpaper-one-piece-straw-hats-sunny-go.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 30px;
    margin-bottom: 5rem;
    border: 1px solid var(--glass-border);
    position: relative;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.8);
}

.hero h2 {
    font-size: 5rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 1);
    text-align: center;
}

.hero-link {
    padding: 1.2rem 3rem;
    background: var(--red-line);
    color: white;
    text-decoration: none;
    font-family: 'Pirata One', cursive;
    font-size: 1.8rem;
    border-radius: 50px;
    letter-spacing: 4px;
    transition: var(--transition-smooth);
    border: 2px solid transparent;
}

.hero-link:hover {
    background: transparent;
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 30px var(--gold-glow);
    transform: scale(1.1);
}

/* ENLIST SECTION */
.enlist-card {
    margin-top: 8rem;
    padding: 4rem;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 30px;
    border: 1px solid var(--gold);
    text-align: center;
    box-shadow: var(--glass-shadow);
}

.enlist-card h2 {
    margin-top: 0;
    font-size: 3rem;
}

.enlist-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 700px;
    margin: 3rem auto 0;
}

.enlist-form input,
.enlist-form select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    border-radius: 12px;
    color: white;
    font-family: 'Roboto', sans-serif;
    transition: var(--transition-smooth);
}

.enlist-form input:focus,
.enlist-form select:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.08);
}

.enlist-form button {
    grid-column: span 2;
    padding: 1.5rem;
    background: var(--red-line);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Pirata One', cursive;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    letter-spacing: 4px;
}

.enlist-form button:hover {
    background: #ff0000;
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.4);
    transform: translateY(-5px);
}

/* CREW & MEMBER CARDS */
.section-title {
    font-family: 'Pirata One', cursive;
    font-size: 4rem;
    color: var(--gold);
    text-align: center;
    margin-bottom: 5rem;
}

.crew-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 4rem;
}

.member-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    overflow: hidden;
    transition: var(--transition-smooth);
    position: relative;
    box-shadow: var(--glass-shadow);
}

.member-card:hover {
    transform: translateY(-20px) scale(1.03);
    border-color: var(--gold);
    box-shadow: 0 30px 70px rgba(255, 215, 0, 0.1);
}

.member-image-wrapper {
    width: 100%;
    height: 500px;
    overflow: hidden;
    position: relative;
}

.member-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s ease;
}

.member-card:hover .member-image {
    transform: scale(1.15);
}

.member-info {
    padding: 3rem 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 40%, transparent);
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.member-role {
    font-family: 'Cinzel', serif;
    color: var(--accent);
    letter-spacing: 4px;
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

.member-name {
    font-family: 'Pirata One', cursive;
    font-size: 2.8rem;
    color: var(--gold);
    line-height: 1;
}

.wanted-label {
    position: absolute;
    top: 30px;
    right: -45px;
    background: var(--red-line);
    color: white;
    padding: 10px 60px;
    transform: rotate(45deg);
    font-family: 'Pirata One', cursive;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* YONKO GRID & CARDS */
.yonko-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    margin-bottom: 8rem;
}

.yonko-card {
    position: relative;
    height: 600px;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
    text-decoration: none;
}

.yonko-card:hover {
    transform: translateY(-15px) rotate(1deg);
    border-color: var(--gold);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.yonko-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

.yonko-card:hover .yonko-img {
    transform: scale(1.1);
}

.yonko-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4rem 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 40%, transparent);
    text-align: center;
}

.yonko-name {
    font-family: 'Pirata One', cursive;
    font-size: 2.8rem;
    color: var(--gold);
    margin: 0;
}

/* MARINE & REVOLUTION GRIDS */
.rank-grid,
.secret-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.rank-card,
.secret-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
    box-shadow: var(--glass-shadow);
}

.rank-card:hover,
.secret-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--gold);
}

.absolute-justice {
    margin: 4rem 0;
    padding: 3rem;
    background: linear-gradient(45deg, #001a33, #002b5c);
    border-radius: 20px;
    text-align: center;
}

.dragon-quote,
.quote {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-style: italic;
    text-align: center;
    margin: 4rem 0;
    color: var(--gold);
    padding: 3rem;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

/* YONKO INDIVIDUAL PAGES */
/* BOUNTY & CREW INTERFACE */
.bounty-card {
    background: var(--parchment);
    color: var(--ink);
    padding: 3rem;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    margin: 0 auto 5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 15px solid #d4c19c;
    position: relative;
    transform: rotate(-2deg);
    transition: var(--transition-smooth);
}

.bounty-card:hover {
    transform: rotate(0deg) scale(1.05);
}

.bounty-card .wanted {
    font-family: 'Pirata One', cursive;
    font-size: 4rem;
    margin: 0;
    letter-spacing: 10px;
}

.bounty-card .amount {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #8b0000;
    margin-top: 1rem;
}

.crew-section {
    margin-top: 6rem;
}

.crew-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.crew-member-lite {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.crew-member-lite:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--gold);
    transform: translateY(-5px);
}

.crew-member-lite h4 {
    margin: 0;
    font-size: 1.2rem;
}

.crew-member-lite span {
    font-size: 0.9rem;
    color: var(--accent);
    font-family: 'Cinzel', serif;
}

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

.milestone-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 20px;
    position: relative;
    border-top: 4px solid var(--gold);
    transition: var(--transition-smooth);
}

.milestone-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-top-color: var(--luffy-red);
}

.milestone-card h4 {
    margin: 0 0 1rem;
    color: var(--gold);
}

.milestone-card .year {
    position: absolute;
    top: -15px;
    right: 20px;
    background: var(--red-line);
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-family: 'Cinzel', serif;
}

.genealogy-box {
    margin-top: 6rem;
    padding: 4rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    text-align: center;
    border: 1px dashed var(--glass-border);
}

.family-tree {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 3rem;
    margin-top: 3rem;
}

.family-member {
    flex: 1;
    min-width: 200px;
}

.family-member h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.family-member span {
    font-family: 'Cinzel', serif;
    color: var(--accent);
    font-size: 0.8rem;
}

.flagship-box {
    margin-top: 6rem;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8)), url('https://www.transparenttextures.com/patterns/wood-pattern.png');
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 4rem;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 4rem;
    box-shadow: var(--glass-shadow);
}

.flagship-info {
    flex: 1;
}

.flagship-info h3 {
    margin-top: 0;
    color: var(--gold);
}

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

.technique-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 15px;
    transition: var(--transition-smooth);
}

.technique-card:hover {
    background: rgba(204, 0, 0, 0.2);
    transform: scale(1.05);
    border-color: var(--red-line);
}

.technique-card h4 {
    color: var(--gold);
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
}

.technique-card p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

.yonko-hero {
    width: 100%;
    height: 500px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    margin-bottom: 3rem;
    position: relative;
    background-size: cover;
    background-position: center;
}

.yonko-badge,
.justice-badge,
.freedom-badge {
    position: absolute;
    padding: 10px 30px;
    border-radius: 50px;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.yonko-badge {
    top: 20px;
    left: 20px;
    background: var(--red-line);
}

.justice-badge {
    bottom: -20px;
    right: 40px;
    background: white;
    color: var(--marine-blue);
    border-radius: 10px;
}

.freedom-badge {
    top: 20px;
    right: 20px;
    background: var(--crimson);
    border-radius: 5px;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 8rem 2rem;
    background: rgba(11, 14, 20, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #888;
    margin-top: 10rem;
    border-top: 1px solid var(--glass-border);
}