/* Social System Styles */
.social-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1000px;
    height: 80%;
    max-height: 700px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 2px solid #00d4ff;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.social-header {
    background: rgba(0, 212, 255, 0.1);
    padding: 15px 20px;
    border-bottom: 1px solid #00d4ff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-header h2 {
    color: #00d4ff;
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.close-btn {
    background: none;
    border: none;
    color: #ff4757;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 71, 87, 0.2);
    transform: scale(1.1);
}

.social-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid #00d4ff;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
}

.tab-btn.active {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    border-bottom-color: #00d4ff;
}

.social-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.tab-content {
    display: none;
}

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

/* Friends Tab Styles */
.friends-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.add-friend-section,
.friend-requests-section,
.friends-list-section {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #00d4ff;
    border-radius: 10px;
    padding: 15px;
}

.add-friend-section h3,
.friend-requests-section h3,
.friends-list-section h3 {
    color: #00d4ff;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-container input {
    flex: 1;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00d4ff;
    border-radius: 5px;
    color: white;
    font-size: 14px;
}

.search-container input::placeholder {
    color: #888;
}

.search-container button,
.add-friend-btn,
.accept-btn,
.decline-btn,
.send-money-btn,
.view-stats-btn,
.remove-friend-btn {
    padding: 10px 15px;
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-container button:hover,
.add-friend-btn:hover,
.accept-btn:hover,
.send-money-btn:hover,
.view-stats-btn:hover {
    background: linear-gradient(45deg, #00b8e6, #0088bb);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 212, 255, 0.3);
}

.decline-btn,
.remove-friend-btn {
    background: linear-gradient(45deg, #ff4757, #cc3a4a);
}

.decline-btn:hover,
.remove-friend-btn:hover {
    background: linear-gradient(45deg, #ff3742, #bb2f3f);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 71, 87, 0.3);
}

#search-results {
    max-height: 200px;
    overflow-y: auto;
}

.search-result,
.friend-request,
.friend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 5px;
    margin-bottom: 10px;
}

.user-info,
.request-info,
.friend-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.username {
    color: #00d4ff;
    font-weight: bold;
    font-size: 16px;
}

.join-date,
.request-date,
.friend-meta {
    color: #888;
    font-size: 12px;
}

.balance {
    color: #4ecdc4;
    font-weight: bold;
}

.friend-stats {
    display: flex;
    gap: 15px;
    color: #ccc;
    font-size: 12px;
}

.friend-actions,
.user-actions,
.request-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.status-badge.friend {
    background: rgba(76, 205, 196, 0.2);
    color: #4ecdc4;
    border: 1px solid #4ecdc4;
}

.status-badge.pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid #ffc107;
}

/* Profile Tab Styles */
.profile-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #00d4ff;
    border-radius: 10px;
    padding: 15px;
}

.stat-card h4 {
    color: #00d4ff;
    margin: 0 0 15px 0;
    font-size: 16px;
    text-align: center;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

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

.stat-label {
    color: #ccc;
    font-size: 14px;
}

.stat-value {
    color: #00d4ff;
    font-weight: bold;
    font-size: 14px;
}

.transactions-section {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #00d4ff;
    border-radius: 10px;
    padding: 15px;
}

.transactions-section h3 {
    color: #00d4ff;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 5px;
    margin-bottom: 10px;
}

.transaction-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.transaction-type {
    color: #ccc;
    font-size: 14px;
}

.transaction-date {
    color: #888;
    font-size: 12px;
}

.transaction-amount {
    font-weight: bold;
    font-size: 16px;
}

.transaction-amount.sent {
    color: #ff4757;
}

.transaction-amount.received {
    color: #4ecdc4;
}

.fee {
    color: #888;
    font-size: 12px;
    font-weight: normal;
}

/* Leaderboard Tab Styles */
.leaderboard-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.leaderboard-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #00d4ff;
    border-radius: 10px;
    padding: 15px;
}

.leaderboard-filters select {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00d4ff;
    border-radius: 5px;
    color: white;
    font-size: 14px;
}

.leaderboard-filters button {
    padding: 8px 15px;
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.leaderboard-filters button:hover {
    background: linear-gradient(45deg, #00b8e6, #0088bb);
    transform: translateY(-2px);
}

.leaderboard-table {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #00d4ff;
    border-radius: 10px;
    overflow: hidden;
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 60px 1fr 120px 100px 120px;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 212, 255, 0.1);
    border-bottom: 1px solid #00d4ff;
    font-weight: bold;
    color: #00d4ff;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 60px 1fr 120px 100px 120px;
    gap: 10px;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    color: #ccc;
    transition: background 0.3s ease;
}

.leaderboard-row:hover {
    background: rgba(0, 212, 255, 0.05);
}

.leaderboard-row.current-user {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid #00d4ff;
    border-radius: 5px;
    margin: 2px;
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.rank {
    color: #00d4ff;
    font-weight: bold;
}

.value {
    color: #4ecdc4;
    font-weight: bold;
}

.win-rate {
    color: #ffc107;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
}

.modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 2px solid #00d4ff;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 80%;
    overflow-y: auto;
}

.modal.large {
    max-width: 800px;
}

.modal-header {
    background: rgba(0, 212, 255, 0.1);
    padding: 15px 20px;
    border-bottom: 1px solid #00d4ff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #00d4ff;
    margin: 0;
    font-size: 18px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #00d4ff;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: #00d4ff;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00d4ff;
    border-radius: 5px;
    color: white;
    font-size: 14px;
    box-sizing: border-box;
}

.fee-info {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    border-radius: 5px;
    padding: 10px;
    margin-top: 10px;
}

.fee-info p {
    margin: 5px 0;
    color: #ffc107;
    font-size: 14px;
}

.cancel-btn {
    background: linear-gradient(45deg, #6c757d, #5a6268);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: linear-gradient(45deg, #5a6268, #495057);
    transform: translateY(-2px);
}

.send-btn {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-btn:hover {
    background: linear-gradient(45deg, #00b8e6, #0088bb);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 212, 255, 0.3);
}

/* Message Styles */
.social-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    z-index: 30000;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: none;
}

.social-message.success {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    border: 1px solid #4ecdc4;
}

.social-message.error {
    background: linear-gradient(45deg, #ff4757, #cc3a4a);
    border: 1px solid #ff4757;
}

.social-message.info {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    border: 1px solid #00d4ff;
}

/* Utility Classes */
.no-results,
.no-data {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .social-container {
        width: 95%;
        height: 90%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .leaderboard-header,
    .leaderboard-row {
        grid-template-columns: 40px 1fr 80px 60px 80px;
        font-size: 12px;
    }
    
    .friend-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .friend-actions button {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .modal {
        width: 95%;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .social-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 10px;
        font-size: 14px;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .leaderboard-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .leaderboard-filters select,
    .leaderboard-filters button {
        width: 100%;
    }
}