/* Cape Detail Page Styles - Modernisiert für dripleaf */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

body {
    font-family: 'VT323', monospace;
    color: #FFF;
    background-color: #171615;
    overflow-x: hidden;
    min-height: 100vh;
}

.page-bg {
    background-image: url('../img/background.webp');
    background-repeat: repeat;
    background-size: cover;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity: 0.4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: #262423;
    padding: 15px 0;
    border-bottom: 4px solid #555;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo, .logo-link {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    color: #FFF;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-logo, .logo-img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    image-rendering: pixelated;
}

.nav-links, .nav-menu {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-links a, .nav-menu a {
    color: #DDD;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 5px 10px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-color 0.3s;
}

.nav-links a:hover, .nav-menu a:hover {
    color: #4ade80;
    border-bottom-color: #4ade80;
}

.back-link {
    margin: 1.5rem 0;
}

.back-link a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
}

.back-link a:hover {
    color: #4ade80;
}

/* Cape Detail Header */
.cape-detail-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

/* Cape Image */
.cape-detail-image-container {
    position: relative;
    width: 300px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25), 0 1.5px 0 #000;
}

.cape-detail-image {
    width: 100%;
    height: auto;
    display: block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    border-bottom: 3px solid #000;
}

.cape-detail-rarity {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.cape-detail-rarity.common {
    background: #333;
    color: #ccc;
}

.cape-detail-rarity.uncommon {
    background: #1e462a;
    color: #4ade80;
}

.cape-detail-rarity.rare {
    background: #1e3a8a;
    color: #93c5fd;
}

.cape-detail-rarity.epic {
    background: #4b2582;
    color: #d8b4fe;
}

.cape-detail-rarity.legendary {
    background: #7e1e87;
    color: #e9d5ff;
}

.cape-detail-rarity.mythic {
    background: #854d0e;
    color: #fef08a;
}

/* Cape Title Area */
.cape-detail-title {
    flex: 1;
}

.cape-detail-title h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-family: 'Press Start 2P', cursive;
    color: #FFF;
    text-shadow: 4px 4px 0px #000;
}

.cape-detail-meta {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.meta-separator {
    margin: 0 0.5rem;
}

/* Hash Container */
.cape-hash-container {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    margin: 1rem 0;
    max-width: 100%;
    overflow: hidden;
    border: 2px solid #000;
    box-shadow: 2px 2px 0px #000;
}

.hash-field {
    display: flex;
    align-items: center;
    flex: 1;
    overflow: hidden;
}

.hash-label {
    color: #888;
    font-size: 0.9rem;
    margin-right: 8px;
    white-space: nowrap;
}

.hash-value {
    color: #ddd;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.small-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #4CAF50;
    color: #FFF;
    border: 2px solid #000;
    border-radius: 4px;
    padding: 6px 10px;
    margin-left: 8px;
    cursor: pointer;
    font-family: 'VT323', monospace;
    font-size: 1rem;
    box-shadow: 2px 2px 0px #000;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.small-button:hover {
    background: #66BB6A;
    color: #FFF;
    box-shadow: 0px 0px 0px #000;
}

.share-button, .share-button-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #4CAF50;
    color: #FFF;
    border: 2px solid #000;
    border-radius: 4px;
    padding: 0.3rem 0.8rem;
    cursor: pointer;
    font-family: 'VT323', monospace;
    font-size: 0.95rem;
    box-shadow: 2px 2px 0px #000;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    vertical-align: middle;
}

.share-button:hover, .share-button-inline:hover {
    background: #66BB6A;
    color: #FFF;
    box-shadow: 0px 0px 0px #000;
}

/* Content layout */
.cape-detail-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 0;
}

/* Cape Detail Sections */
.cape-detail-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 0.5rem;
    height: fit-content;
    border: 2px solid #000;
    box-shadow: 2px 2px 0px #000;
}

.cape-detail-section h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #ccc;
    font-family: 'Press Start 2P', cursive;
}

#capeDescription {
    margin: 0;
    line-height: 1.6;
    color: #aaa;
}

/* Technical Details */
.cape-technical-details {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.cape-detail-row {
    display: flex;
    flex-direction: row;
}

.detail-label {
    width: 120px;
    color: #888;
    font-size: 0.9rem;
}

.detail-value {
    color: #ddd;
    font-size: 0.9rem;
    word-break: break-all;
    flex: 1;
}

/* Share Section */
.share-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.share-buttons {
    display: none;
}

/* Similar Capes */
.similar-capes h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.similar-capes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}

/* Loading & Error States */
.cape-loading, .error-message {
    text-align: center;
    padding: 4rem 0;
    color: #888;
    font-family: 'VT323', monospace;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #222;
    border-top: 4px solid #4ade80;
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

.hidden {
    display: none !important;
}

/* Toast notification for copy link */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #2e563a;
    color: #4ade80;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    opacity: 1;
    transition: opacity 0.3s;
    z-index: 100;
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    box-shadow: 2px 2px 0px #000;
    border: 2px solid #000;
}

.toast.hidden {
    opacity: 0;
}

footer {
    background-color: #222;
    padding: 20px 0;
    margin-top: auto;
    border-top: 4px solid #444;
}

.footer-links a {
    color: #AAA;
    text-decoration: none;
    margin-left: 15px;
    font-size: 1rem;
    font-family: 'VT323', monospace;
}

.footer-links a:hover {
    color: #4ade80;
}

.footer-text {
    color: #888;
    font-size: 1rem;
    font-family: 'VT323', monospace;
}

/* Players list styling - 3 columns on desktop */
.players-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
}

.player-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    padding: 8px 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, box-shadow 0.2s;
    border: 2px solid #000;
    box-shadow: 2px 2px 0px #000;
    margin: 0;
    min-width: 0;
}

.player-name {
    font-weight: 500;
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

@media (max-width: 900px) {
    .players-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .cape-detail-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    .cape-detail-image-container {
        width: 100%;
        max-width: 220px;
        margin: 0 auto 1rem auto;
    }
    .cape-detail-title h1 {
        font-size: 1.3rem;
    }
    .cape-detail-section {
        padding: 1rem;
    }
    .players-list {
        grid-template-columns: 1fr;
        gap: 8px;
        max-height: 220px;
    }
    .player-item {
        padding: 6px 8px;
        font-size: 0.95rem;
    }
    .small-button, .share-button, .share-button-inline {
        font-size: 0.9rem;
        padding: 0.3rem 0.7rem;
    }
    .toast {
        font-size: 0.95rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 400px) {
    .cape-detail-title h1 {
        font-size: 1rem;
    }
    .small-button, .share-button, .share-button-inline {
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
    }
}

@media (max-width: 900px) {
    .cape-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .cape-detail-image-container {
        width: 200px;
        margin-bottom: 1.5rem;
    }
    .cape-detail-content {
        grid-template-columns: 1fr;
    }
    .player-item {
        width: calc(50% - 8px);
    }
}

@media (max-width: 600px) {
    .player-item {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0 4px;
    }
    .cape-detail-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin-bottom: 1rem;
    }
    .cape-detail-image-container {
        width: 50vw;
        max-width: 180px;
        min-width: 0;
        margin-bottom: 1rem;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
    .cape-detail-title h1 {
        font-size: 1.5rem;
        word-break: break-word;
    }
    .cape-detail-meta {
        font-size: 0.8rem;
    }
    .cape-detail-section {
        padding: 1rem 0.5rem;
        margin-bottom: 1rem;
    }
    .cape-detail-content {
        gap: 0.5rem;
    }
    .players-list {
        gap: 4px;
        padding-right: 0;
        max-height: 200px;
    }
    .player-item {
        width: 100%;
        padding: 6px 6px;
        gap: 8px;
    }
    .player-head {
        width: 28px;
        height: 28px;
    }
    .player-name {
        font-size: 0.85rem;
    }
    .player-uuid {
        font-size: 0.65rem;
    }
    .back-link {
        margin: 1rem 0 0.5rem 0;
    }
    .hash-label,
    .hash-value {
        font-size: 0.8rem;
    }
    .small-button,
    .share-button,
    .share-button-inline {
        font-size: 0.8rem;
        padding: 0.5rem 0.7rem;
    }
    .toast {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        bottom: 1rem;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}