.teams-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.teams-popup-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 0;
    width: 95%;
    max-width: 1200px;
    height: 80vh;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.close-popup {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.close-popup:hover {
    background-color: #ff4444;
    color: white;
    transform: rotate(90deg);
}

.teams-tabs {
    display: flex;
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    padding: 15px 50px 15px 15px;
    gap: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 5;
}

.tab-button {
    flex: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

.tab-button i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.tab-button:hover {
    background-color: #e9ecef;
    color: #333;
}

.tab-button.active {
    background-color: #6ec6ff;
    color: white;
}

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

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.tab-pane h3 {
    margin-bottom: 20px;
    color: #333;
}

/* Teams List Styles */
.teams-slider-container {
    position: relative;
    width: 100%;
    padding: 0 60px;
    margin: 20px 0;
}

.teams-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 12px;
    padding: 15px 10px;
    overflow: hidden;
}

.team-item {
    width: 100%;
    height: 150px;
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    position: relative;
}

.team-item:hover {
    background-color: #e9ecef;
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.team-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    height: 100%;
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.team-header h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-status {
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 500;
}

.team-status.active {
    background-color: #28a745;
    color: white;
}

.team-status.inactive {
    background-color: #dc3545;
    color: white;
}

.team-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 5px;
    background-color: rgba(110, 198, 255, 0.1);
    border-radius: 8px;
}

.team-member-count,
.team-captain {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #495057;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-member-count i,
.team-captain i {
    color: #6ec6ff;
    font-size: 9px;
    flex-shrink: 0;
}

.team-stats {
    display: flex;
    justify-content: space-around;
    padding: 5px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: auto;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.stat-value {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.stat-label {
    font-size: 7px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form Styles */
.create-team-form {
    width: 100%;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.create-team-form .form-group {
    margin-bottom: 20px;
    width: 100%;
}

.create-team-form .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 16px;
}

.create-team-form .form-group input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.create-team-form .form-group input:focus {
    border-color: #6ec6ff;
    box-shadow: 0 0 0 3px rgba(110, 198, 255, 0.2);
    outline: none;
}

.create-team-form .button-group {
    display: flex;
    gap: 10px;
}

.create-team-form .submit-btn,
.create-team-form .cancel-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.create-team-form .submit-btn {
    background-color: #6ec6ff;
    color: white;
}

.create-team-form .submit-btn:hover {
    background-color: #5ba9e6;
    transform: translateY(-2px);
}

.create-team-form .cancel-btn {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ddd;
}

.create-team-form .cancel-btn:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

/* Search Styles */
.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-container input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.search-btn {
    background-color: #6ec6ff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.join-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: auto;
}

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

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

.success-message {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

/* Hide slider buttons since we're using grid */
.slider-btn {
    display: none;
}

/* Update scrollbar styles for the grid */
.teams-list::-webkit-scrollbar {
    width: 6px;
}

.teams-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.teams-list::-webkit-scrollbar-thumb {
    background: #6ec6ff;
    border-radius: 3px;
}

.teams-list::-webkit-scrollbar-thumb:hover {
    background: #5ba9e6;
}

.delete-team-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #ff4444;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.team-item:hover .delete-team-btn {
    opacity: 1;
}

.delete-team-btn:hover {
    background-color: #cc0000;
    transform: scale(1.1);
}

/* Joinable Teams Styles */
.joinable-teams {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.joinable-team-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.joinable-team-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.joinable-team-item .team-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.joinable-team-item .team-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.joinable-team-item .team-name i {
    color: #6ec6ff;
    font-size: 14px;
}

.joinable-team-item .team-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.joinable-team-item .member-count,
.joinable-team-item .captain {
    display: flex;
    align-items: center;
    gap: 6px;
}

.joinable-team-item .member-count i,
.joinable-team-item .captain i {
    color: #6ec6ff;
    font-size: 12px;
}

.join-team-btn {
    padding: 8px 16px;
    background-color: #6ec6ff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.join-team-btn:hover {
    background-color: #5ba9e6;
    transform: translateY(-1px);
}

.join-team-btn.pending {
    background-color: #ffc107;
    cursor: not-allowed;
}

.join-team-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Search Container Styles */
.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    position: relative;
}

.search-container input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-container input:focus {
    border-color: #6ec6ff;
    box-shadow: 0 0 0 3px rgba(110, 198, 255, 0.1);
    outline: none;
}

.search-btn {
    padding: 12px 20px;
    background-color: #6ec6ff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background-color: #5ba9e6;
}

/* No Results and Error Messages */
.no-teams-found,
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.no-teams-found i,
.error-message i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #6ec6ff;
}

.error-message i {
    color: #dc3545;
}

.no-teams-found p,
.error-message p {
    font-size: 14px;
    margin: 0;
}

/* Scrollbar Styles */
.joinable-teams::-webkit-scrollbar {
    width: 6px;
}

.joinable-teams::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.joinable-teams::-webkit-scrollbar-thumb {
    background: #6ec6ff;
    border-radius: 3px;
}

.joinable-teams::-webkit-scrollbar-thumb:hover {
    background: #5ba9e6;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.slider-btn:hover {
    background-color: #6ec6ff;
    color: white;
}

.prev-btn {
    left: 5px;
}

.next-btn {
    right: 5px;
}

.slider-btn i {
    font-size: 14px;
}

/* Hide scrollbar but keep functionality */
.teams-list::-webkit-scrollbar {
    display: none;
}

.teams-list {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.create-team-card {
    width: 100%;
    height: 150px;
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    cursor: pointer;
    border: 2px dashed #6ec6ff;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.create-team-card:hover {
    background-color: rgba(110, 198, 255, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.create-team-card i {
    font-size: 24px;
    color: #6ec6ff;
}

.create-team-card span {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.invites-section {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.invites-section h4,
.search-section h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 15px;
    font-weight: 500;
}

.received-invites {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.invite-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.invite-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.invite-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.invite-team-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.invite-team-name i {
    color: #6ec6ff;
    font-size: 13px;
}

.invite-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #666;
}

.invite-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.invite-meta i {
    color: #6ec6ff;
    font-size: 10px;
}

.invite-actions {
    display: flex;
    gap: 6px;
}

.accept-invite-btn,
.decline-invite-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.accept-invite-btn {
    background-color: #28a745;
    color: white;
}

.accept-invite-btn:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

.decline-invite-btn {
    background-color: #dc3545;
    color: white;
}

.decline-invite-btn:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

.search-section {
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.no-invites i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #6ec6ff;
}

.no-invites p {
    font-size: 14px;
    margin: 0;
}