* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "vazir";
}

@font-face {
    font-family: "vazir";
    src: url("../fonts/Vazir-Black.woff") format("woff");
    font-display: swap;
}

@font-face {
    font-family: "naz";
    src: url("fonts/BNazanin.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "iran";
    src: url("fonts/farsi/BMitra.eot") format("embedded-opentype"),
         url("fonts/farsi/BMitra.ttf") format("truetype"),
         url("fonts/farsi/BMitra.woff") format("woff");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: "vazir", sans-serif;
    background-color: #f8f9fa;
    padding-bottom: 70px;
    min-height: 100vh;
}

.header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1abc9c, #16a085);
    color: white;
    padding: 12px 15px;
    font-size: 22px;
    font-weight: bold;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow: 0 4px 12px rgba(22, 160, 133, 0.3);
}

.title {
    font-size: 22px;
    font-family: "vazir";
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.search:hover {
    transform: scale(1.1);
}

.loading-section {
    width: 90%;
    margin: 20px auto 15px;
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(26, 188, 156, 0.2);
}

.loading-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #f0f9f7, #e8f5f2);
    border-bottom: 1px solid rgba(26, 188, 156, 0.3);
    gap: 10px;
}

.loading-icon {
    width: 24px;
    height: 24px;
    color: #1abc9c;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-header span {
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
}

.loading-items {
    padding: 10px 0;
}

.loading-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.loading-item:hover {
    background-color: rgba(26, 188, 156, 0.05);
}

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

.loading-dot {
    width: 10px;
    height: 10px;
    background: #1abc9c;
    border-radius: 50%;
    margin-left: 12px;
    animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.loading-text {
    flex: 1;
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
}

.ligs {
    display: flex;
    flex-direction: column;
    width: 90%;
    margin: 15px auto;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ligs:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.titr {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    width: 100%;
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid transparent;
}

.titr:hover {
    background: #f1f3f4;
}

.city-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.logolig {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #1abc9c;
    padding: 2px;
}

.txt {
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
}

.open-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotate(0deg);
}

.open-icon.rotated {
    transform: rotate(180deg);
}

.tournament-list {
    display: none;
    background: white;
    animation: slideDown 0.3s ease;
}

.tournament-list.show {
    display: block;
}

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

.tournament-item {
    display: block;
    padding: 14px 18px;
    text-decoration: none;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    background: white;
    color: #2c3e50;
    font-size: 14px;
}

.tournament-item:hover {
    background: #f8f9fa;
    padding-right: 25px;
}

.footer {
    display: flex;
    flex-direction: row;
    position: fixed;
    bottom: 0;
    width: 100%;
    background: white;
    border-top: 0.02px solid rgba(0,0,0,0.1);
}

.i {
    flex: 0 0 25%;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 5px 0;
}

.i:active {
    background: rgba(26, 188, 156, 0.3);
}

.i img {
    width: 25px;
    height: 25px;
    margin: 2px 0 0 0;
}

.i p {
    font-size: 4vw;
    color: #717171;
    font-family: "vazir";
}

.iconn {
    color: #717171;
    width: 25px;
    height: 25px;
}

.lig {
    background: rgba(26, 188, 156, 0.3);
}

@media screen and (max-width: 380px) {
    .title {
        font-size: 18px;
    }
    
    .txt {
        font-size: 14px;
    }
    
    .logolig {
        width: 35px;
        height: 35px;
    }
    
    .tournament-item {
        font-size: 13px;
    }
    
    .i p {
        font-size: 10px;
    }
    
    .loading-header span {
        font-size: 14px;
    }
    
    .loading-text {
        font-size: 13px;
    }
}

@media screen and (min-width: 768px) {
    .ligs, .loading-section {
        width: 70%;
    }
    
    .main {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .i p {
        font-size: 14px;
    }
}

@media screen and (min-width: 1024px) {
    .ligs, .loading-section {
        width: 60%;
        max-width: 800px;
    }
}