/* Header styling to match the library.html template */

/* Header */
header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: #0a0a1a !important; /* Dark purple background for header */
    background-color: #0a0a1a !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
    padding: 0.25rem 0 !important;
    text-align: left !important;
    width: 100% !important;
    margin: 0 !important;
}

.header-container {
    padding: 0.5rem 2rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    background-color: #0a0a1a !important;
}

header h1 {
    margin: 0 !important; 
    font-size: 1.5rem !important;
    line-height: 1.5 !important;
    color: #00ffcc !important;
    text-shadow: 0 0 10px #00ffcc !important;
}

nav {
    display: flex !important;
    justify-content: center !important;
    background-color: #0f0f1f !important; /* Darker purple for navigation */
    padding: 0.5rem 0 !important;
    border-top: 1px solid #2a2a4a !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

nav a {
    color: #8a9cff !important;
    text-decoration: none !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
}

nav a:hover {
    color: #ffffff !important;
    text-shadow: 0 0 8px #8a9cff !important;
}

.badge {
    background-color: #ff2a6d;
    color: white;
    border-radius: 50%;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    margin-left: 5px;
}

.hidden {
    display: none;
}

.btn-connect {
    background: linear-gradient(135deg, #4a2dff 0%, #8a2be2 100%);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wallet-connected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #8a9cff;
    font-size: 0.9rem;
}

.truncate {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Special styling for navigation active links */
header nav a.nav-nft {
    color: #00ffcc;
    text-shadow: 0 0 8px #00ffcc;
}

header nav a.nav-library {
    color: #00ffcc;
    text-shadow: 0 0 8px #00ffcc;
}

/* Adjust body to account for fixed header */
body {
    padding-top: 90px; /* Adjusted for header height */
}

/* Challenge Invitation Popup Styles */
.challenge-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-in-out;
}

.challenge-popup {
    background: #1a1a2e;
    border: 2px solid #00ffcc;
    border-radius: 10px;
    padding: 1rem;
    max-width: 320px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.3);
    animation: slideIn 0.3s ease-out;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.challenge-popup h3 {
    color: #00ffcc;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    text-shadow: 0 0 10px #00ffcc;
}

.challenge-popup .challenger-name {
    color: #8a9cff;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.challenge-popup .challenge-message {
    color: #cccccc;
    margin-bottom: 1rem;
    font-style: italic;
    padding: 0.3rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    min-height: 15px;
    font-size: 0.9rem;
}

.challenge-popup .challenge-message:empty::before {
    content: "No message";
    color: #666;
}

.challenge-popup .deck-selection {
    margin-bottom: 1rem;
}

.challenge-popup select {
    background: #0f0f1f;
    color: #cccccc;
    border: 1px solid #00ffcc;
    border-radius: 5px;
    padding: 0.4rem;
    width: 100%;
    font-size: 0.9rem;
}

.challenge-popup select option {
    background: #0f0f1f;
    color: #cccccc;
}

.challenge-popup .buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.challenge-popup .btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    flex: 1;
}

.challenge-popup .btn-accept {
    background: linear-gradient(45deg, #00ff88, #00ffcc);
    color: #000;
}

.challenge-popup .btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.4);
}

.challenge-popup .btn-decline {
    background: linear-gradient(45deg, #ff4757, #ff6b7a);
    color: #fff;
}

.challenge-popup .btn-decline:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

.challenge-popup .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.challenge-popup .loading {
    color: #00ffcc;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.challenge-popup .error {
    color: #ff4757;
    font-size: 0.9rem;
    margin-top: 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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