/* ================================================
   PUBLIC PROFILE STYLES
================================================ */

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

.profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-avatar i {
    font-size: 48px;
    color: white;
}

.profile-info {
    flex: 1;
}

.profile-username {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-date {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.profile-actions {
    margin-top: 20px;
}

.follow-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.follow-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.follow-button.following {
    background: #27ae60;
    border-color: #27ae60;
}

.profile-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.nav-tab {
    padding: 15px 25px;
    text-decoration: none;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-tab:hover {
    color: #333;
    background: #f8f9fa;
}

.nav-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.tab-content {
    display: none;
}

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

/* Deck and binder grid styles */
.decks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.binders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Profile container specific overrides - MAXIMUM specificity */
body .profile-container .deck-header,
body .profile-container .binder-header {
    padding: 20px !important;
    background: #4a5568 !important; /* Changed from dark #2d3748 to lighter #4a5568 */
    color: white !important;
    position: relative !important;
}

body .profile-container .deck-name,
body .profile-container .binder-name {
    font-size: 1.3em !important;
    font-weight: 700 !important;
    margin: 0 0 8px 0 !important;
    line-height: 1.2 !important;
}

body .profile-container .deck-link,
body .profile-container .binder-link {
    color: white !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
    pointer-events: none !important; /* Prevent link clicks from interfering with card click */
}

body .profile-container .deck-link:hover,
body .profile-container .binder-link:hover {
    color: #f0f0f0 !important;
}

body .profile-container .deck-header .deck-meta,
body .profile-container .binder-header .binder-meta {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 0.85em !important;
    opacity: 0.9 !important;
}

body .profile-container .deck-description,
body .profile-container .binder-description {
    color: #666 !important;
    font-size: 0.9em !important;
    line-height: 1.4 !important;
    margin-bottom: 15px !important;
    height: 60px !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
}

body .profile-container .deck-stats {
    display: flex !important;
    gap: 20px !important;
    padding: 15px 0 !important;
    border-top: 1px solid #f0f0f0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

body .profile-container .deck-stat {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: #666 !important;
    font-size: 14px !important;
}

body .profile-container .deck-stat i {
    color: #667eea !important;
    font-size: 16px !important;
}

body .profile-container .binder-color {
    width: 100% !important;
    height: 8px !important;
    border-radius: 4px !important;
    margin: 15px 0 !important;
}

/* Deck body for content below header */
body .profile-container .deck-body,
body .profile-container .binder-body {
    padding: 20px !important;
}

/* Additional styles for the new structure */
body .profile-container .deck-stats-row,
body .profile-container .binder-stats-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 0.85em !important;
    color: #888 !important;
}

body .profile-container .deck-updated,
body .profile-container .binder-updated {
    color: #888 !important;
    font-size: 0.85em !important;
}

/* Deck colors indicators - same as public_decks.html */
body .profile-container .deck-colors {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 15px !important;
}

body .profile-container .color-indicator {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

body .profile-container .color-red { background-color: #ff4444 !important; }
body .profile-container .color-blue { background-color: #4488ff !important; }
body .profile-container .color-green { background-color: #44aa44 !important; }
body .profile-container .color-white { background-color: #f8f8f8 !important; border-color: #ddd !important; }
body .profile-container .color-colorless { background-color: #999 !important; }

/* Override the deck-meta in body to match Explore Decks style */
body .profile-container .deck-body .deck-meta,
body .profile-container .binder-body .binder-meta {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 0.85em !important;
    color: #888 !important;
    border-top: 1px solid #f0f0f0 !important;
    padding-top: 15px !important;
    margin-top: 15px !important;
}

/* Style for the "View Deck →" and "View Binder →" text */
body .profile-container .view-deck-text,
body .profile-container .view-binder-text {
    color: #667eea !important;
    font-weight: 600 !important;
    font-size: 0.9em !important;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.empty-state p {
    margin: 0;
    font-size: 16px;
}

/* ================================================
   DARK MODE STYLES - HIGHER SPECIFICITY
================================================ */

/* Profile navigation dark mode */
body.dark-mode .profile-nav {
    border-bottom-color: #374151;
}

body.dark-mode .nav-tab {
    color: #9ca3af;
}

body.dark-mode .nav-tab:hover {
    color: #e2e8f0;
    background: #374151;
}

body.dark-mode .nav-tab.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

/* Deck and binder cards dark mode - higher specificity */
body.dark-mode .profile-container .deck-card,
body.dark-mode .profile-container .binder-card {
    /* background: #2d3748 !important; */
    border-color: #4a5568 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .profile-container .deck-card:hover,
body.dark-mode .profile-container .binder-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
    border-color: #60a5fa !important;
    transform: translateY(-5px) !important;
}

/* Card content dark mode */
body.dark-mode .profile-container .deck-name,
body.dark-mode .profile-container .binder-name {
    color: #e2e8f0 !important;
}

body.dark-mode .profile-container .deck-link,
body.dark-mode .profile-container .binder-link {
    color: #e2e8f0 !important;
}

body.dark-mode .profile-container .deck-link:hover,
body.dark-mode .profile-container .binder-link:hover {
    color: #60a5fa !important;
}

body.dark-mode .profile-container .deck-meta,
body.dark-mode .profile-container .binder-meta {
    color: #9ca3af !important;
}

/* Dark mode header background - same as light mode for consistency */
body.dark-mode .profile-container .deck-header,
body.dark-mode .profile-container .binder-header {
    background: #4a5568 !important; /* Changed from dark #2d3748 to lighter #4a5568 */
}

body.dark-mode .profile-container .deck-description,
body.dark-mode .profile-container .binder-description {
    color: #9ca3af !important;
}

body.dark-mode .profile-container .deck-stat {
    color: #9ca3af !important;
}

body.dark-mode .profile-container .deck-stat i {
    color: #60a5fa !important;
}

/* Empty state dark mode */
body.dark-mode .profile-container .empty-state {
    color: #9ca3af !important;
}

body.dark-mode .profile-container .empty-state i {
    color: #4a5568 !important;
}

body.dark-mode .profile-container .empty-state h3 {
    color: #e2e8f0 !important;
}

body.dark-mode .profile-container .empty-state p {
    color: #9ca3af !important;
}

/* ================================================
   RESPONSIVE DESIGN
================================================ */

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .profile-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .profile-nav {
        flex-direction: column;
    }
    
    .decks-grid, .binders-grid {
        grid-template-columns: 1fr;
    }
}
