/* FFXIV-Themed Styling */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Lato:wght@300;400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    background: #0a0e1a;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(30, 40, 80, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(40, 30, 60, 0.2) 0%, transparent 50%);
    background-attachment: fixed;
    color: #d4c5a0;
    min-height: 100vh;
    line-height: 1.6;
}

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

/* Header */
header {
    text-align: center;
    padding: 60px 0 40px;
    margin-bottom: 50px;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c9a961, transparent);
}

header h1 {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #f4e4bc;
    text-shadow:
        0 0 20px rgba(201, 169, 97, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 3px;
    margin-bottom: 10px;
}

header h1::before,
header h1::after {
    content: '⟡';
    margin: 0 20px;
    color: #c9a961;
    font-size: 0.8em;
}

/* Characters Grid */
.characters-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 80px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.character-card {
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 100%);
    border: 3px solid #2a2f3f;
    border-image: linear-gradient(135deg, #c9a961, #8b7355, #c9a961) 1;
    position: relative;
    transition: all 0.4s ease;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(201, 169, 97, 0),
        inset 0 1px 0 rgba(201, 169, 97, 0.1);
    display: flex;
    flex-direction: row;
}

/* Reverse layout on large screens only */
.character-card.reverse {
    flex-direction: row-reverse;
}

.character-card.reverse .character-image {
    border-right: none;
    border-left: 2px solid rgba(201, 169, 97, 0.3);
}

.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid rgba(201, 169, 97, 0.2);
    pointer-events: none;
    transition: all 0.4s ease;
}

.character-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 16px 48px rgba(201, 169, 97, 0.3),
        0 0 60px rgba(201, 169, 97, 0.1),
        inset 0 1px 0 rgba(201, 169, 97, 0.2);
    border-image: linear-gradient(135deg, #f4e4bc, #c9a961, #f4e4bc) 1;
}

.character-card:hover::before {
    border-color: rgba(201, 169, 97, 0.4);
}

/* Corner Decorations */
.character-card::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid rgba(201, 169, 97, 0.15);
    pointer-events: none;
}

.character-image {
    width: 400px;
    min-width: 400px;
    height: auto;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(10, 14, 26, 0.4) 0%, rgba(10, 14, 26, 0.8) 100%),
        #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-right: 2px solid rgba(201, 169, 97, 0.3);
}

.character-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 14, 26, 0.6) 100%);
    pointer-events: none;
    z-index: 1;
}

.character-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: brightness(1.05) contrast(1.05);
}

.character-card:hover .character-image img {
    transform: scale(1.05);
}

.character-info {
    padding: 30px;
    background: linear-gradient(180deg, rgba(15, 20, 25, 0.8) 0%, rgba(10, 14, 26, 0.9) 100%);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.character-name {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 600;
    color: #f4e4bc;
    margin-bottom: 10px;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    letter-spacing: 1px;
}

.character-world {
    font-size: 1.1rem;
    color: #c9a961;
    font-weight: 400;
    text-align: center;
    margin-bottom: 25px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.achievement-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    cursor: help;
}

.achievement-total {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #f4e4bc;
    font-weight: 700;
    text-shadow:
        0 0 15px rgba(201, 169, 97, 0.6),
        0 2px 8px rgba(0, 0, 0, 0.8);
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(20, 25, 35, 0.9), rgba(15, 20, 30, 0.95));
    border: 2px solid rgba(201, 169, 97, 0.5);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(201, 169, 97, 0.2);
    transition: all 0.3s ease;
}

.achievement-total::before {
    content: '🏆 ';
    font-size: 1.2rem;
    margin-right: 8px;
}

.achievement-badge:hover .achievement-total {
    opacity: 0;
    pointer-events: none;
}

.achievement-hover {
    position: absolute;
    top: 0;
    right: 0;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(20, 25, 35, 0.98), rgba(15, 20, 30, 0.98));
    border: 2px solid rgba(201, 169, 97, 0.7);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(201, 169, 97, 0.3),
        inset 0 1px 0 rgba(201, 169, 97, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    min-width: 200px;
    white-space: nowrap;
}

.achievement-badge:hover .achievement-hover {
    opacity: 1;
    pointer-events: auto;
}

.achievement-hover .achievement-label {
    font-size: 0.7rem;
    color: #c9a961;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    margin-bottom: 5px;
}

.achievement-hover .achievement-label.obtainable {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(201, 169, 97, 0.3);
}

.achievement-hover .achievement-value {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: #f4e4bc;
    font-weight: 700;
    text-shadow:
        0 0 10px rgba(201, 169, 97, 0.5),
        0 2px 6px rgba(0, 0, 0, 0.8);
    margin-bottom: 4px;
}

.achievement-hover .achievement-value.obtainable {
    margin-bottom: 4px;
}

.achievement-hover .achievement-desc {
    font-size: 0.65rem;
    color: #8b7355;
    font-style: italic;
    margin-bottom: 8px;
    line-height: 1.3;
    font-weight: 400;
}

.achievement-hover .achievement-updated {
    font-size: 0.6rem;
    color: #6b5d4a;
    font-style: italic;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(201, 169, 97, 0.2);
    opacity: 0.8;
}

.last-updated {
    text-align: center;
    font-size: 0.7rem;
    color: #6b5d4a;
    font-style: italic;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(201, 169, 97, 0.1);
    opacity: 0.7;
}

.job-categories {
    text-align: left;
    margin-top: 20px;
}

.job-category {
    margin-bottom: 18px;
    padding: 12px;
    background: rgba(201, 169, 97, 0.03);
    border-left: 3px solid rgba(201, 169, 97, 0.4);
    border-radius: 2px;
}

.job-category-title {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: #c9a961;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.job-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.job-badge {
    display: inline-flex;
    align-items: stretch;
    background: linear-gradient(135deg, rgba(20, 25, 35, 0.5), rgba(15, 20, 30, 0.2));
    border: 1px solid rgba(139, 115, 85, 0.2);
    color: #544e3f;
    font-size: 0.85rem;
    font-weight: 400;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.job-abbr {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.job-level {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid rgba(139, 115, 85, 0.3);
    background: rgba(0, 0, 0, 0.2);
    min-width: 35px;
    font-weight: 600;
}

.job-badge:hover {
    cursor: default;
}

.job-badge.in-progress {
    background: linear-gradient(135deg, rgba(20, 25, 35, 0.8), rgba(15, 20, 30, 0.9));
    border-color: rgba(139, 115, 85, 0.5);
    color: #d4c5a0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.job-badge.in-progress .job-level {
    border-left-color: rgba(139, 115, 85, 0.5);
    background: rgba(0, 0, 0, 0.3);
}

.job-badge.in-progress:hover {
    background: linear-gradient(135deg, rgba(30, 35, 45, 0.9), rgba(25, 30, 40, 1));
    border-color: rgba(201, 169, 97, 0.6);
    color: #f4e4bc;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(201, 169, 97, 0.2);
}

.job-badge.max-level {
    background: linear-gradient(135deg, rgba(20, 25, 35, 0.8), rgba(15, 20, 30, 0.9));
    border-color: rgba(139, 115, 85, 0.5);
    color: #d4c5a0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.job-badge.max-level .job-level {
    border-left-color: #c9a961;
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.25), rgba(139, 115, 85, 0.3));
    color: #f4e4bc;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(201, 169, 97, 0.2);
}

.job-badge.max-level:hover {
    background: linear-gradient(135deg, rgba(30, 35, 45, 0.9), rgba(25, 30, 40, 1));
    border-color: rgba(201, 169, 97, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(201, 169, 97, 0.2);
}

.job-badge.max-level:hover .job-level {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.35), rgba(139, 115, 85, 0.4));
    border-left-color: #f4e4bc;
    box-shadow: 0 0 15px rgba(201, 169, 97, 0.3);
}

/* Relic Section */
.relic-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid rgba(201, 169, 97, 0.15);
}

.relic-category {
    margin-bottom: 18px;
    padding: 12px;
    background: rgba(201, 169, 97, 0.03);
    border-left: 3px solid rgba(201, 169, 97, 0.4);
    border-radius: 2px;
}

.relic-category-title {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: #c9a961;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.relic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.relic-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(20, 25, 35, 0.5), rgba(15, 20, 30, 0.2));
    border: 1px solid rgba(139, 115, 85, 0.2);
    color: #544e3f;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    min-width: 80px;
    position: relative;
    overflow: hidden;
}

.relic-name {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    text-align: center;
}

.relic-stage {
    font-size: 0.7rem;
    color: #8b7355;
    font-style: italic;
    margin-bottom: 4px;
    text-align: center;
}

.relic-completion {
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
}

.relic-progress {
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.3);
    margin-top: 6px;
    overflow: hidden;
    border-radius: 2px;
}

.relic-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #8b7355, #c9a961);
    transition: width 0.5s ease;
    box-shadow: 0 0 8px rgba(201, 169, 97, 0.5);
}

/* Relic Badge States */
.relic-badge.not-started {
    opacity: 0.5;
}

.relic-badge.not-started:hover {
    opacity: 0.7;
}

.relic-badge.in-progress {
    background: linear-gradient(135deg, rgba(20, 25, 35, 0.8), rgba(15, 20, 30, 0.9));
    border-color: rgba(139, 115, 85, 0.5);
    color: #d4c5a0;
}

.relic-badge.in-progress .relic-progress-bar {
    background: linear-gradient(90deg, #c9a961, #f4e4bc);
    box-shadow: 0 0 12px rgba(201, 169, 97, 0.7);
}

.relic-badge.in-progress:hover {
    background: linear-gradient(135deg, rgba(30, 35, 45, 0.9), rgba(25, 30, 40, 1));
    border-color: rgba(201, 169, 97, 0.6);
    color: #f4e4bc;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(201, 169, 97, 0.2);
}

.relic-badge.complete {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.2), rgba(139, 115, 85, 0.3));
    border-color: #c9a961;
    color: #f4e4bc;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(201, 169, 97, 0.3);
}

.relic-badge.complete .relic-name {
    color: #f4e4bc;
}

.relic-badge.complete .relic-stage {
    color: #c9a961;
}

.relic-badge.complete .relic-completion {
    color: #f4e4bc;
    text-shadow: 0 0 10px rgba(201, 169, 97, 0.5);
}

.relic-badge.complete .relic-progress-bar {
    background: linear-gradient(90deg, #c9a961, #f4e4bc, #c9a961);
    box-shadow: 0 0 20px rgba(201, 169, 97, 0.8);
    animation: shimmer 2s infinite;
}

.relic-badge.complete:hover {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.3), rgba(139, 115, 85, 0.4));
    border-color: #f4e4bc;
    transform: translateY(-2px);
    box-shadow:
        0 4px 8px rgba(201, 169, 97, 0.3),
        0 0 25px rgba(201, 169, 97, 0.5);
}

@keyframes shimmer {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Social Links Section */
.social-links {
    text-align: center;
    padding: 60px 40px;
    margin: 80px auto 60px;
    max-width: 800px;
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 100%);
    border: 3px solid #2a2f3f;
    border-image: linear-gradient(135deg, #c9a961, #8b7355, #c9a961) 1;
    position: relative;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(201, 169, 97, 0.1);
}

.social-links::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid rgba(201, 169, 97, 0.15);
    pointer-events: none;
}

.social-links h2 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 600;
    color: #f4e4bc;
    margin-bottom: 40px;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, rgba(20, 25, 35, 0.8), rgba(15, 20, 30, 0.9));
    border: 2px solid rgba(201, 169, 97, 0.5);
    color: #d4c5a0;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
    transition: all 0.4s ease;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.social-link::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1px solid rgba(201, 169, 97, 0.2);
    pointer-events: none;
    transition: all 0.4s ease;
}

.social-link:hover {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.2), rgba(139, 115, 85, 0.3));
    border-color: #f4e4bc;
    color: #f4e4bc;
    transform: translateY(-4px);
    box-shadow:
        0 8px 24px rgba(201, 169, 97, 0.3),
        0 0 30px rgba(201, 169, 97, 0.2);
}

.social-link:hover::before {
    border-color: rgba(244, 228, 188, 0.4);
}

.social-link svg {
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
    border-top: 2px solid rgba(201, 169, 97, 0.2);
    color: #8b7355;
    font-size: 0.9rem;
}

footer p {
    margin-bottom: 8px;
}

footer .trademark {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

footer .attribution {
    margin-top: 20px;
    font-size: 0.8rem;
}

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

footer a:hover {
    color: #f4e4bc;
    text-decoration: underline;
}

/* Responsive Design */

/* Large screens */
@media (min-width: 1600px) {
    .container {
        max-width: 2000px;
    }

    .characters-grid {
        max-width: 2000px;
    }

    .character-image {
        width: 500px;
        min-width: 500px;
    }

    .job-categories {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .job-category {
        margin-bottom: 0;
    }
}

@media (max-width: 1024px) {
    .character-image {
        width: 350px;
        min-width: 350px;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

    .characters-grid {
        gap: 30px;
    }

    .character-card,
    .character-card.reverse {
        border-width: 2px;
        flex-direction: column;
    }

    .character-image {
        width: 100%;
        min-width: 100%;
        height: 550px;
        border-right: none;
        border-left: none;
        border-bottom: 2px solid rgba(201, 169, 97, 0.3);
    }

    .character-info {
        padding: 25px;
    }

    .social-links {
        padding: 40px 20px;
        margin: 60px auto 40px;
    }

    .social-links h2 {
        font-size: 1.6rem;
    }

    .links {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .social-link {
        width: 240px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }

    header {
        padding: 40px 0 30px;
        margin-bottom: 30px;
    }

    header h1 {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    header h1::before,
    header h1::after {
        margin: 0 10px;
    }

    .character-image {
        height: 500px;
    }

    .character-name {
        font-size: 1.6rem;
    }

    .character-info {
        padding: 20px;
    }

    .job-category {
        padding: 10px;
    }

    .achievement-badge {
        top: 15px;
        right: 15px;
    }

    .achievement-total {
        font-size: 1.2rem;
        padding: 10px 14px;
    }

    .achievement-total::before {
        font-size: 1rem;
        margin-right: 6px;
    }

    .achievement-hover {
        padding: 12px 16px;
        min-width: 180px;
    }

    .achievement-hover .achievement-value {
        font-size: 1.2rem;
    }

    .achievement-hover .achievement-desc {
        font-size: 0.6rem;
    }

    .achievement-hover .achievement-updated {
        font-size: 0.55rem;
        margin-top: 10px;
        padding-top: 10px;
    }

    .last-updated {
        font-size: 0.65rem;
        margin-top: 20px;
        padding-top: 12px;
    }
}
