/* CNC Anniversary Tournament Results Styles */

/* Inline Logo */
.inline-logo {
    height: 1.2em;
    width: auto;
    vertical-align: middle;
    margin-right: 0.5rem;
    display: inline-block;
}

/* Citation alignment */
#blurb .cite {
    text-align: left;
    margin-bottom: 0;
}

/* Remove h2 left border for this page */
h2 {
    border-left: none;
    padding-left: 0;
}

/* Remove section left border */
.section {
    border-left: none !important;
}

#section-0,
#section-1,
#section-2,
#section-3 {
    border-left: none !important;
}

/* Results Table */
.results-table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: #1a1a2e;
    margin: 1rem 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.results-table th {
    padding: 1rem;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid var(--color-three);
}

.results-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(243, 156, 18, 0.3);
}

.results-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Rank Styles */
.rank-medal {
    font-size: 1.5em;
}

.rank-1 {
    background: rgba(255, 215, 0, 0.1);
}

.rank-2 {
    background: rgba(192, 192, 192, 0.1);
}

.rank-3 {
    background: rgba(205, 127, 50, 0.1);
}

/* Player Info */
.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
}

.player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-three);
}

/* Score Highlight */
.score-highlight {
    font-weight: bold;
    color: var(--color-two);
}

/* Unique Monsters Section */
.unique-monsters-section {
    margin: 2rem 0;
}

.unique-monsters-section h3 {
    text-align: center;
    margin: 2rem 0;
}

/* Year Selector */
.year-selector {
    text-align: center;
    margin: 2rem 0;
}

.year-dropdown {
    background: rgba(0, 0, 0, 0.5);
    color: var(--off-white);
    border: 1px solid var(--color-three);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
}

.year-dropdown:hover {
    border-color: var(--color-one);
}

/* Language Toggle */
.lang-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.lang-button {
    background: rgba(0, 0, 0, 0.7);
    color: var(--off-white);
    border: 1px solid var(--color-two);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.lang-button:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: var(--color-one);
}

/* Hidden content for language switching */
.lang-content {
    display: none;
}

.lang-content.active {
    display: block;
}

/* Tournament Info Cards */
.info-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.info-card h3 {
    color: var(--color-three);
    margin-bottom: 1rem;
}

/* Monster List in Table */
.monster-list {
    font-size: 0.85em;
    color: var(--color-three);
    max-width: 350px;
    line-height: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.monster-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.monster-tile {
    width: 20px;
    height: 20px;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Link Buttons */
.results-table a,
#section-3 a {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    margin: 0.2rem;
    background: var(--color-two);
    color: var(--background-color);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

/* Remove box styling from player name links */
.player-info a {
    display: inline;
    padding: 0;
    margin: 0;
    background: none;
    color: inherit;
    font-weight: normal;
}

.player-info a:hover {
    background: none;
    transform: none;
    box-shadow: none;
}

/* Link underlines */
a {
    text-decoration-color: var(--color-three);
}

a:hover {
    text-decoration-color: var(--color-one);
}

.results-table a:hover,
#section-3 a:hover {
    background: var(--color-one);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Tournament Links Section */
.tournament-links-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.link-card {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--color-two);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.link-card:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: var(--color-one);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transform: translateY(-2px);
}

.link-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.link-card h3 {
    color: var(--color-two);
    margin-bottom: 1rem;
}

.link-card p {
    margin-bottom: 1.5rem;
    color: var(--color-three);
}

.trump-card h3 {
    color: var(--color-two);
    margin-bottom: 1rem;
    text-align: center;
}

.trump-card p {
    text-align: center;
    margin-bottom: 1.5rem;
}

.link-button-fancy {
    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--color-two) 0%, var(--color-one) 100%);
    color: var(--background-color) !important;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.link-button-fancy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .results-table {
        font-size: 0.9em;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.5rem;
    }
    
    .player-avatar {
        width: 24px;
        height: 24px;
    }
    
    .lang-toggle {
        top: 10px;
        right: 10px;
    }
    
    .results-table a {
        padding: 0.2rem 0.5rem;
        font-size: 0.85em;
    }
}

/* Screenshot Preview Overlay */
.screenshot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: none;
}

.screenshot-overlay.active {
    pointer-events: auto;
}

.screenshot-preview-image {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 3px solid var(--color-three);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Avatar hover effect */
.player-avatar {
    cursor: pointer;
    transition: transform 0.2s ease;
    user-select: none;
}

.player-avatar:hover {
    transform: scale(1.1);
}

.player-avatar:active {
    transform: scale(0.95);
    opacity: 0.8;
}

/* Screenshot trigger styling */
.screenshot-trigger {
    cursor: zoom-in;
    position: relative;
}

.screenshot-trigger::after {
    content: "🔍";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.8em;
    background: var(--color-two);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screenshot-trigger:hover::after {
    opacity: 1;
}

/* Screenshot Gallery */
.screenshot-gallery-btn {
    background: var(--color-two);
    color: var(--background-color);
    border: none;
    padding: 0.3rem 0.8rem;
    margin: 0.2rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.screenshot-gallery-btn:hover {
    background: var(--color-one);
    transform: translateY(-2px);
}

.screenshot-gallery-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.screenshot-gallery-grid {
    background: #1a1a2e;
    border: 2px solid var(--color-three);
    border-radius: 10px;
    padding: 2rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    position: relative;
}

.gallery-title {
    grid-column: 1 / -1;
    color: var(--color-two);
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.gallery-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.05);
}

.gallery-close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--color-one);
    color: var(--background-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-close-btn:hover {
    background: var(--color-two);
    transform: rotate(90deg);
}

/* Footer styling for dark sections */
#section-3 footer,
.section:last-child footer {
    color: var(--off-white);
}

#section-3 footer p,
.section:last-child footer p {
    color: var(--off-white);
}

