/* Team Page Styles */
.team-page {
    font-family: 'Roboto', sans-serif;
    max-width: 600px;
    margin: 0 auto;
    background-color: #f5f5f5;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Header Styles */
.team-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f9e4b7;
    position: sticky;
    top: 0;
    z-index: 10;
}

.back-button {
    color: #333;
    font-size: 20px;
    margin-right: 15px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.back-button:hover {
    transform: translateX(-3px);
}

.team-title {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    flex-grow: 1;
    text-align: center;
    padding-right: 20px;
}

/* Stats Bar Styles */
.stats-bar {
    display: flex;
    align-items: center;
    background-color: #5271e8;
    color: white;
    padding: 15px;
    position: relative;
}

.level-structure-btn {
    background-color: white;
    color: #333;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.level-structure-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0,0,0,0.1);
}

.total-members {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: auto;
    margin-right: 10px;
}

.member-count {
    font-size: 24px;
    font-weight: bold;
}

.member-label {
    font-size: 14px;
}

.dropdown-icon {
    margin-left: 10px;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.dropdown-icon.active {
    transform: rotate(180deg);
}

/* Search Bar Styles */
.search-container {
    display: flex;
    padding: 15px;
    background-color: #f5f5f5;
}

.search-input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #5271e8;
}

.search-button {
    background-color: #5271e8;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    padding: 0 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: #3f5bd6;
}

/* Level Total Balance Styles */
.level-total-balance {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background-color: white;
}

.level-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.total-amount {
    font-size: 20px;
    font-weight: bold;
    color: #5271e8;
}

/* Member List Styles */
.member-list {
    background-color: #f5f5f5;
    padding: 10px 0;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin: 10px 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.member-item.member-show {
    opacity: 1;
    transform: translateY(0);
}

.member-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.member-info {
    display: flex;
    align-items: center;
}

.level-badge {
    background-color: #e8f0fe;
    color: #5271e8;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 15px;
}

.member-details {
    display: flex;
    flex-direction: column;
}

.member-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.member-date {
    font-size: 12px;
    color: #999;
}

.member-balance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.balance-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.balance-amount {
    font-size: 16px;
    font-weight: 500;
    color: #5271e8;
    margin-bottom: 5px;
}

.arrow-icon {
    color: #ccc;
    transition: transform 0.3s ease;
}

.member-item:hover .arrow-icon {
    transform: translateX(3px);
    color: #5271e8;
}

.no-members {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    color: #999;
    text-align: center;
}

.no-members i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 100;
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal-content.modal-show {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.close-modal {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.level-structure-info ul {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.level-structure-info li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.level-structure-info .level-badge {
    margin-right: 15px;
    min-width: 40px;
    text-align: center;
}

.level-description {
    font-size: 14px;
}

/* Responsive Styles */
@media (max-width: 480px) {
    .team-title {
        font-size: 18px;
    }
    
    .member-name {
        font-size: 14px;
    }
    
    .balance-amount {
        font-size: 14px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse-animation {
    animation: pulse 1.5s infinite;
}
