/* ============================================
   HavenCraft — Shared Page Styles
   Common styles used across all sub-pages
   ============================================ */

/* ── Page Header ──────────────────────────── */
.page-header {
    padding-top: calc(var(--nav-height) + 60px);
    padding-bottom: 40px;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 16px;
}

.page-header .subtitle {
    color: var(--text-secondary);
}

/* ── Text Content Block ───────────────────── */
.text-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    line-height: 1.8;
}

.text-content h2 {
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text);
    font-size: 1.5rem;
}

.text-content h3 {
    margin-top: 20px;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 1.2rem;
}

/* ── Last Updated Badge ───────────────────── */
.last-updated {
    text-align: center;
    margin-top: 20px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   STAFF PAGE STYLES
   ============================================ */
/* Staff Sections */
.staff-category-section {
    margin-bottom: 60px;
}

.staff-category-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    display: inline-block;
    color: var(--text);
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
}

.staff-card {
    background: linear-gradient(145deg, rgba(17, 21, 32, 0.8), rgba(17, 21, 32, 0.4));
    backdrop-filter: blur(var(--blur));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.staff-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* Role Glow Effects */
.staff-card.glow-role-owner:hover { border-color: rgba(255, 80, 80, 0.5); box-shadow: 0 10px 40px rgba(255, 80, 80, 0.15); }
.staff-card.glow-role-admin:hover { border-color: rgba(255, 138, 0, 0.5); box-shadow: 0 10px 40px rgba(255, 138, 0, 0.15); }
.staff-card.glow-role-mod:hover { border-color: rgba(0, 200, 150, 0.5); box-shadow: 0 10px 40px rgba(0, 200, 150, 0.15); }
.staff-card.glow-role-helper:hover { border-color: rgba(79, 140, 255, 0.5); box-shadow: 0 10px 40px rgba(79, 140, 255, 0.15); }
.staff-card.glow-role-officer:hover { border-color: rgba(168, 85, 247, 0.5); box-shadow: 0 10px 40px rgba(168, 85, 247, 0.15); }

.staff-skin-container {
    width: 100%;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.staff-skin-container canvas {
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.4));
    transition: transform 0.3s ease;
}

.staff-card:hover .staff-skin-container canvas {
    transform: scale(1.1);
}

.staff-name {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #fff;
}

.staff-role {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.staff-social {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.staff-social i {
    color: #5865F2; /* Discord color */
    font-size: 1.1rem;
}

.role-owner {
    background: rgba(255, 80, 80, 0.15);
    color: #ff5050;
    border: 1px solid rgba(255, 80, 80, 0.3);
}

.role-admin {
    background: rgba(255, 138, 0, 0.15);
    color: #ff8a00;
    border: 1px solid rgba(255, 138, 0, 0.3);
}

.role-mod {
    background: rgba(0, 200, 150, 0.15);
    color: #00c896;
    border: 1px solid rgba(0, 200, 150, 0.3);
}

.role-helper {
    background: rgba(79, 140, 255, 0.15);
    color: #4f8cff;
    border: 1px solid rgba(79, 140, 255, 0.3);
}

.role-officer {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* Staff Modal */
.staff-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.staff-modal-overlay.show {
    display: flex;
}

.staff-modal.glass-panel {
    background: rgba(17, 21, 32, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    border-radius: 24px;
    max-width: 450px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    animation: modalIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.staff-modal .close-modal {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.staff-modal .close-modal:hover {
    color: #fff;
    background: rgba(255, 80, 80, 0.8);
    border-color: #ff5050;
    transform: rotate(90deg);
}

.staff-modal-skin-wrapper {
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.staff-modal-skin-wrapper canvas {
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.6));
}

.staff-modal-name {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #fff;
}

.staff-discord-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 6px 16px;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 20px;
    color: #fff;
    font-size: 0.95rem;
}

.staff-discord-tag i {
    color: #5865F2;
}

.staff-modal-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-top: 24px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

/* ============================================
   NEWS / UPDATES SECTION
   ============================================ */
.news-section {
    text-align: center;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 10px;
}

.news-card {
    background: var(--surface);
    backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: left;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.news-card:hover::before {
    opacity: 1;
}

.news-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.news-badge-update {
    background: rgba(0, 200, 150, 0.12);
    color: var(--primary);
    border: 1px solid rgba(0, 200, 150, 0.2);
}

.news-badge-event {
    background: rgba(255, 138, 0, 0.12);
    color: var(--accent);
    border: 1px solid rgba(255, 138, 0, 0.2);
}

.news-badge-announcement {
    background: rgba(79, 140, 255, 0.12);
    color: #4f8cff;
    border: 1px solid rgba(79, 140, 255, 0.2);
}

.news-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.news-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.news-card-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================================
   LIVE ACTIVITY FEED
   ============================================ */
.activity-feed-section {
    padding: 30px 0 10px;
}

.activity-ticker {
    overflow: hidden;
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0;
}

.activity-ticker-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}

.activity-ticker-header .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse-dot 2s ease-in-out infinite;
}

.activity-list {
    padding: 12px 20px;
    max-height: 200px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    animation: fadeInUp 0.4s ease both;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.activity-item-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.activity-item-text strong {
    color: var(--text);
    font-weight: 700;
}

.activity-item-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.activity-empty {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================
   PROFILE PAGE — Enhanced
   ============================================ */
.profile-header {
    padding-top: calc(var(--nav-height) + 40px);
    padding-bottom: 20px;
    text-align: center;
}

.profile-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.profile-card {
    background: var(--surface);
    backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease both;
}

.profile-header-info {
    display: flex;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.profile-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-md);
    background: rgba(0,0,0,0.2);
    image-rendering: pixelated;
    object-fit: cover;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.profile-name {
    font-size: 2rem;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.profile-sub {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.profile-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-voter {
    background: rgba(0, 200, 150, 0.12);
    color: var(--primary);
    border: 1px solid rgba(0, 200, 150, 0.2);
}

.badge-veteran {
    background: rgba(255, 183, 0, 0.12);
    color: #FFB700;
    border: 1px solid rgba(255, 183, 0, 0.2);
}

.badge-pvp {
    background: rgba(255, 80, 80, 0.12);
    color: #ff5050;
    border: 1px solid rgba(255, 80, 80, 0.2);
}

.badge-rich {
    background: rgba(168, 85, 247, 0.12);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.profile-share-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.profile-share-link {
    flex: 1;
    padding: 8px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-share-copy {
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    transition: all var(--transition);
    white-space: nowrap;
}

.profile-share-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 200, 150, 0.3);
}

.profile-kd-ratio {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent);
}

/* Profile Guest Login Enhancement */
.profile-login-card {
    max-width: 420px;
    margin: 40px auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 36px;
    text-align: center;
    animation: fadeInUp 0.6s ease both;
}

.profile-login-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(0, 200, 150, 0.1), rgba(79, 140, 255, 0.1));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
}

.profile-login-card h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.profile-login-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.profile-login-input-group {
    display: flex;
    gap: 10px;
}

.profile-login-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.92rem;
    outline: none;
    transition: border-color var(--transition);
}

.profile-login-input:focus {
    border-color: var(--primary);
}

.profile-login-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary), #6ba0ff);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all var(--transition);
    white-space: nowrap;
}

.profile-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(79, 140, 255, 0.3);
}

.profile-login-hint {
    margin-top: 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.profile-login-hint i {
    color: var(--primary);
    margin-right: 4px;
}

/* Profile Stats */
.stat-box {
    background: rgba(0, 200, 150, 0.05);
    border: 1px solid rgba(0, 200, 150, 0.1);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
}

.stat-val {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.section-title {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: var(--text);
    border-left: 3px solid var(--primary);
    padding-left: 10px;
}

.cooldowns-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.cooldown-card {
    background: rgba(255, 138, 0, 0.05);
    border: 1px solid rgba(255, 138, 0, 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cooldown-site {
    font-weight: 600;
    color: var(--text);
}

.cooldown-timer {
    font-family: monospace;
    font-size: 1.2rem;
    color: var(--accent);
    font-weight: bold;
}

.available-status {
    color: var(--primary);
    font-weight: bold;
    font-size: 1.1rem;
}


/* ============================================
   GALLERY PAGE
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 40px;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition);
}

.gallery-item:hover {
    box-shadow: var(--shadow-lg);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: #fff;
    font-weight: 600;
    z-index: 2;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease 0.1s;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}
