body {
    font-family: 'IRANSans', 'Vazir', sans-serif;
    direction: rtl;
    text-align: center;
    background: url('background.webp') no-repeat center center fixed;
    background-size: cover;
    color: #ffffff;
    margin: 0;
    padding: 0;
    /* حذف display: grid یا تغییر آن به display: flex */
    display: flex;
    flex-direction: column; /* افزودن این خط برای نمایش عناصر به صورت عمودی */
    height: 100vh;
}

.navbar {
    width: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(45, 45, 45, 0.8));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    border-radius: 0 0 10px 10px;
}

/* تنظیمات پروفایل باکس */
.profile-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* تنظیم اندازه تصویر پروفایل */
.profile-box img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-left: 10px;
}

.profile-info {
    color: #ffffff;
    text-align: right;
}

.profile-info h4 {
    margin: 0;
    font-size: 14px;
}

.profile-info p {
    margin: 0;
    font-size: 10px;
    color: #ffa500;
}

.profile-box:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.lives {
    display: flex;
    align-items: center;
    margin-top: 3px;
}

.lives img {
    width: 18px;
    height: 18px;
    margin-left: 5px;
}

/* تنظیمات لینک‌های منو */
.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* مخفی کردن منو در حالت عادی در موبایل */
.nav-links.active {
    display: flex !important;
}


.nav-links a {
    color: #ffffff;
    margin-left: 10px;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

/* تنظیمات برای منو toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.menu-toggle div {
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    margin: 4px 0;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: #ffa500;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.3);
}

.menu-toggle:hover div {
    background-color: #ffa500;
}


/* انیمیشن برای منو toggle */
.menu-toggle.active div:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active div:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active div:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* تنظیمات برای موبایل */
@media (max-width: 768px) {
    .navbar {
        flex-direction: row-reverse;
        justify-content: space-between;
        align-items: center;
        padding: 5px;
    }
    .menu-toggle {
        order: 2;
    }
    .profile-box {
        order: 1;
        margin-left: 10px;
    }
    .profile-box img {
        width: 25px;
        height: 25px;
        margin-left: 5px;
    }
    .profile-info h4 {
        font-size: 12px;
    }
    .profile-info p {
        font-size: 8px;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        align-items: flex-end;
        position: absolute;
        top: 50px;
        right: 0;
        background: rgba(0, 0, 0, 0.9);
        width: 100%;
        z-index: 999;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    }
    .nav-links a {
        font-size: 12px;
        padding: 10px;
        margin: 0;
        width: 100%;
        text-align: right;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .menu-toggle {
        display: flex;
    }
    .menu-toggle.active + .nav-links {
        display: flex;
    }
}

/* تنظیمات برای دسکتاپ */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
    .nav-links {
        display: flex !important;
    }
}
.container {
    margin-top: 80px;
    padding: 20px;
}

.highlight {
    background-color: yellow;
}

.btn-custom {
    background-color: #ffa500;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.2);
}

.btn-custom:hover {
    background-color: #ff4500;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.4);
}

#friends-section {
    display: none;
    color: #333;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.friend-item, .request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.friend-item button, .request-item button {
    margin-left: 5px;
}

.btn-primary, .btn-danger {
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    color: white;
}

.btn-primary {
    background-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

#lyrics {
    margin: 20px auto;
    white-space: pre-line;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    color: #333;
    position: relative;
    overflow: hidden;
    text-align: center;
    transition: all 0.3s ease;
}

#lyrics::before, #lyrics::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    animation: animate 10s linear infinite;
    border-radius: 50%;
}

#lyrics::after {
    animation-delay: 5s;
}

@keyframes animate {
    0% {
        transform: rotate(0deg) translate(0, 0);
    }
    100% {
        transform: rotate(360deg) translate(50%, 50%);
    }
}

.line-animate {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
}

.line-animate:nth-child(odd) {
    animation: fadeInUp 0.5s forwards, slideInLeft 0.6s forwards;
}

.line-animate:nth-child(even) {
    animation: fadeInUp 0.5s forwards, slideInRight 0.6s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: #333;
    }
}

#guess {
    margin: 20px;
}

#guess input {
    border: 2px solid #ffa500;
    border-radius: 25px;
    padding: 10px 15px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#guess input:focus {
    border-color: #ff4500;
    box-shadow: 0 0 10px rgba(255, 69, 0, 0.5);
}

#score {
    margin-top: 20px;
    font-size: 24px;
    color: #ffa500;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.2);
}

#score i {
    margin-right: 10px;
}

#score:hover {
    background-color: #ff4500;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.4);
}

#light-show {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.light {
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255, 64, 129, 0.2);
    border-radius: 50%;
    animation: dance 2s infinite alternate ease-in-out;
}

@keyframes dance {
    from {
        transform: scale(1) translateY(0);
        opacity: 0.6;
    }
    to {
        transform: scale(1.5) translateY(-20px);
        opacity: 0.1;
    }
}

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

.pulse {
    animation: pulse 2s infinite;
}

/* Loading screen styles */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('background_loading.jpg') no-repeat center center;
    background-size: cover;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#loading-text {
    color: white;
    font-size: 24px;
    font-weight: bold;
    margin-top: 300px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    animation: blink 1s linear infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

#main-content {
    display: none; /* مخفی کردن بخش اصلی تا زمان بارگذاری کامل */
}

#start-button {
    background-image: linear-gradient(45deg, #ff4500, #ff6b00);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 15px rgba(255, 69, 0, 0.2);
    margin-top: 350px;
}

#start-button:hover {
    background-image: linear-gradient(45deg, #ff6500, #ff8c00);
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(255, 69, 0, 0.4);
}

/* Title styles */
#song-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #ffa500;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.correct-next-line {
    margin-top: 20px;
    padding: 10px;
    background-color: rgba(0, 255, 0, 0.1);
    border: 1px solid green;
    border-radius: 10px;
    color: green;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

.correct-next-line.error {
    color: red;
    background-color: rgba(255, 0, 0, 0.1);
    border: 1px solid red;
}

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

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    display: none;
}

.overlay-message {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.5s ease-in-out, fadeOut 0.5s ease-in-out 2.5s;
}

.overlay-message.success {
    background-color: rgba(0, 128, 0, 0.8);
}

.overlay-message.error {
    background-color: rgba(128, 0, 0, 0.8);
}

.overlay-message.info {
    background-color: rgba(0, 0, 128, 0.8);
}

.overlay-message i {
    margin-right: 10px;
}

.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    display: none;
}

.confirm-message {
    background-color: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80%;
    max-width: 400px;
}

.confirm-buttons {
    margin-top: 20px;
    width: 100%;
    display: flex;
    justify-content: space-around;
}

.confirm-buttons button {
    margin: 0 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.confirm-buttons button:hover {
    transform: scale(1.05);
}

.confirm-buttons .confirm-yes {
    background-color: #28a745;
    color: white;
}

.confirm-buttons .confirm-yes:hover {
    background-color: #218838;
}

.confirm-buttons .confirm-no {
    background-color: #dc3545;
    color: white;
}

.confirm-buttons .confirm-no:hover {
    background-color: #c82333;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

#toast-container > div {
    text-align: center;
    margin: 0 auto;
    margin-top: 20px;
}

@media (max-width: 768px) {
    #toast-container {
        width: 90%;
        margin: 0 auto;
        left: 0;
        right: 0;
    }

    #toast-container > div {
        width: 100%;
        box-sizing: border-box;
        padding: 10px;
    }

    .confirm-message {
        width: 90%;
        padding: 20px;
    }

    .confirm-buttons button {
        width: 100%;
        margin: 10px 0;
        padding: 10px;
    }
}

.timer-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 20px auto;
    display: none; /* پنهان کردن تایمر تا زمان شروع */
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-circle-bg, .timer-circle {
    fill: none;
    stroke-width: 8;
}

.timer-circle-bg {
    stroke: #eee;
}

.timer-circle {
    stroke: #ff4500;
    stroke-dasharray: 100;
    stroke-linecap: round;
}

.timer-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    font-weight: bold;
    color: #ff4500;
}

.options-container {
    display: none;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: space-around;
}

.option {
    background: linear-gradient(135deg, #72EDF2 10%, #5151E5 100%);
    border: 2px solid #ddd;
    border-radius: 5px;
    padding: 10px 20px;
    margin: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    color: #fff;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.option:hover {
    background: linear-gradient(135deg, #5151E5 10%, #72EDF2 100%);
    transform: scale(1.05);
}

.option.correct {
    background: linear-gradient(135deg, #A1FFCE 10%, #FAFFD1 100%);
    border-color: #4CAF50;
    color: #333;
}

.option.wrong {
    background: linear-gradient(135deg, #FFC3A0 10%, #FFAFBD 100%);
    border-color: #F44336;
    color: #333;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1; /* Ensure it is behind other content */
}

.request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 10px 0;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.request-item-content {
    display: flex;
    align-items: center;
}

.profile-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
}

.custom-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.section-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.add-friend-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.add-friend-container input {
    flex: 1;
    margin-right: 10px;
}

.table-responsive {
    overflow-x: auto;
}

.table thead th {
    text-align: center;
    font-size: 14px;
}

.table tbody td {
    vertical-align: middle;
    text-align: center;
    font-size: 14px;
}

.profile-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.btn-custom {
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-custom:hover {
    background-color: #0056b3;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 20px;
    }

    .add-friend-container {
        flex-direction: column;
    }

    .add-friend-container input,
    .add-friend-container button {
        margin-bottom: 10px;
        width: 100%;
    }

    .table thead th,
    .table tbody td {
        font-size: 12px;
    }

    .profile-photo {
        width: 30px;
        height: 30px;
    }
}

.friends-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.section-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.match-request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.match-request-item p {
    margin: 0;
    font-size: 16px;
}

.match-request-item button {
    margin-left: 10px;
}

.btn-secondary {
    margin-left: 10px;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 20px;
    }

    .add-friend-container {
        flex-direction: column;
    }

    .add-friend-container input,
    .add-friend-container button {
        margin-bottom: 10px;
        width: 100%;
    }

    .table thead th,
    .table tbody td {
        font-size: 12px;
    }

    .profile-photo {
        width: 30px;
        height: 30px;
    }
}

.song-info-card {
    display: none;
    align-items: center;
    background: linear-gradient(135deg, #8365f6 0%, #ff3d04 100%);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 10px;
    margin-bottom: 10px;
    color: #333;
    direction: rtl;
    max-width: 90%;
    margin: 0 auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.5s ease forwards; /* اضافه کردن انیمیشن */
}

.song-info-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.song-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 10px;
}

.artist-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.artist-name {
    margin-top: 5px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    text-align: center;
}

.song-details {
    text-align: center;
    flex-grow: 1;
}

.song-title {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

/* Animation classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.match-start-btn {
    text-align: center;
    margin-bottom: 20px;
}

.match-options {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.match-option {
    background: #ff3d04;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    margin: 0 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.match-option:hover {
    background: #d32f2f;
}

.timer-circle {
    width: 36px;
    height: 36px;
    margin: 0 auto;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
}

@keyframes progress {
    0% { stroke-dasharray: 0, 100; }
}

.countdown {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 100px;
    color: #ff0000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#match-song-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

#match-artist-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-right: 20px;
}

#match-artist-name, #match-song-title {
    font-size: 24px;
    font-weight: bold;
}

#match-lyrics {
    margin: 20px auto;
    white-space: pre-line;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    color: #333;
    position: relative;
    overflow: hidden;
    text-align: center;
    transition: all 0.3s ease;
}

#match-lyrics::before, #lyrics::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    animation: animate 10s linear infinite;
    border-radius: 50%;
}

#match-lyrics::after {
    animation-delay: 5s;
}

@keyframes animate {
    0% {
        transform: rotate(0deg) translate(0, 0);
    }
    100% {
        transform: rotate(360deg) translate(50%, 50%);
    }
}

.friends-container {
    max-width: 100%;
    margin: 20px auto;
    padding: 20px;
    background: linear-gradient(135deg, #f1f1f1, #ffffff);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.section-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
    color: #fff;
    background: linear-gradient(135deg, #ff4e50, #f9d423);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.add-friend-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    background: #ffffff;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.add-friend-container input {
    flex: 1;
    margin-right: 10px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.add-friend-container button {
    padding: 10px 20px;
    background: #007bff;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-friend-container button:hover {
    background: #0056b3;
}

.table-responsive {
    overflow-x: auto;
}

.table thead th {
    text-align: center;
    font-size: 14px;
    color: #555;
    background: #f7f7f7;
    border-bottom: 2px solid #ddd;
}

.table tbody td {
    vertical-align: middle;
    text-align: center;
    font-size: 14px;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.profile-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.friend-item, .request-item, .match-request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 10px 0;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.friend-item:hover, .request-item:hover, .match-request-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.friend-item button, .request-item button, .match-request-item button {
    margin-left: 5px;
    padding: 5px 10px;
    border-radius: 5px;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

.section-divider {
    height: 1px;
    border: none;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(0,0,0,0.75) 50%, rgba(255,255,255,0) 100%);
    margin: 20px 0;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 20px;
    }

    .add-friend-container {
        flex-direction: column;
    }

    .add-friend-container input,
    .add-friend-container button {
        margin-bottom: 10px;
        width: 100%;
    }

    .table thead th,
    .table tbody td {
        font-size: 12px;
    }

    .profile-photo {
        width: 30px;
        height: 30px;
    }
}

.friends-list-container, .requests-list-container, .match-requests-container {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.list-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background: #f9f9f9;
    color: #555;
}

.table tbody tr:hover {
    background: #f1f1f1;
}

/* استایل سفارشی برای صفحه اصلی بازی */
#game-section {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

#start-btn {
    background-image: linear-gradient(45deg, #ff4500, #ff6b00);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 15px rgba(255, 69, 0, 0.2);
    margin-top: 20px;
}

#start-btn:hover {
    background-image: linear-gradient(45deg, #ff6500, #ff8c00);
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(255, 69, 0, 0.4);
}

#lyrics {
    margin: 20px auto;
    white-space: pre-line;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    color: #333;
    position: relative;
    overflow: hidden;
    text-align: center;
    transition: all 0.3s ease;
}

#lyrics::before, #lyrics::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    animation: animate 10s linear infinite;
    border-radius: 50%;
}

#lyrics::after {
    animation-delay: 5s;
}

@keyframes animate {
    0% {
        transform: rotate(0deg) translate(0, 0);
    }
    100% {
        transform: rotate(360deg) translate(50%, 50%);
    }
}

.timer-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 20px auto;
    display: none; /* پنهان کردن تایمر تا زمان شروع */
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-circle-bg, .timer-circle {
    fill: none;
    stroke-width: 8;
}

.timer-circle-bg {
    stroke: #eee;
}

.timer-circle {
    stroke: #ff4500;
    stroke-dasharray: 100;
    stroke-linecap: round;
}

.timer-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    font-weight: bold;
    color: #ff4500;
}

.options-container {
    display: none;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: space-around;
}

.option {
    background: linear-gradient(135deg, #72EDF2 10%, #5151E5 100%);
    border: 2px solid #ddd;
    border-radius: 5px;
    padding: 10px 20px;
    margin: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    color: #fff;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.option:hover {
    background: linear-gradient(135deg, #5151E5 10%, #72EDF2 100%);
    transform: scale(1.05);
}

.option.correct {
    background: linear-gradient(135deg, #A1FFCE 10%, #FAFFD1 100%);
    border-color: #4CAF50;
    color: #333;
}

.option.wrong {
    background: linear-gradient(135deg, #FFC3A0 10%, #FFAFBD 100%);
    border-color: #F44336;
    color: #333;
}

#score {
    margin-top: 20px;
    font-size: 24px;
    color: #ffa500;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.2);
}

#score i {
    margin-right: 10px;
}

#score:hover {
    background-color: #ff4500;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.4);
}

.match-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: url('background.webp') no-repeat center center fixed;
    background-size: cover;
    color: #ffffff;
    text-align: center;
}

.start-message {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

#start-button {
    background-image: linear-gradient(45deg, #ff4500, #ff6b00);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 69, 0, 0.2);
    margin-top: 20px;
}

#start-button:hover {
    background-image: linear-gradient(45deg, #ff6500, #ff8c00);
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(255, 69, 0, 0.4);
}


/* استایل جدید برای جدول رقابتی */

#match-results {
    display: block; /* Ensure it's visible */
    width: 100%;
    max-width: 100%;
}

#match-results table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed; /* Ensure table layout is fixed */
}

#match-results img {
    max-width: 100%; /* Ensure images fit within their container */
}

.competitive-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.8rem;
    text-align: center;
    background-color: #2c3e50;
    color: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    table-layout: auto; /* Ensure table layout is auto for responsive design */    
}

.competitive-table th, .competitive-table td {
    border: 1px solid #34495e;
    padding: 12px;
    transition: background-color 0.3s, transform 0.3s;
}

.competitive-table th {
    background-color: #34495e;
    font-weight: bold;
    font-size: 1rem;
}

.competitive-table td {
    background-color: #2c3e50;
}

.competitive-table td img.profile-photo {
    display: block;
    margin: 0 auto;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #ecf0f1;
}

.result-message {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #e74c3c;
    text-align: center;
    animation: glow 1.5s infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px #e74c3c, 0 0 20px #e74c3c, 0 0 30px #e74c3c;
    }
    to {
        text-shadow: 0 0 20px #e74c3c, 0 0 30px #e74c3c, 0 0 40px #e74c3c;
    }
}

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

#match-results {
    animation: slideIn 0.5s ease-out;
}

.confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.winner-highlight {
    background-color: #27ae60;
    color: #fff;
    font-size: 1.2rem;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
    animation: winnerAnimation 2s infinite;
}

@keyframes winnerAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Offline Game */

/* مسابقه آفلاین */
#offline-section {
    background: linear-gradient(to right, #6a11cb, #2575fc); /* پس‌زمینه گرادینت */
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: #ffffff;
    font-family: 'IRANSans', 'Vazir', sans-serif;
}

#team-creation {
    margin-bottom: 30px;
}

#team-name {
    padding: 10px;
    border: none;
    border-radius: 5px;
    margin-right: 10px;
    width: 200px;
    background-color: #ecf0f1;
    color: #2c3e50;
}

button {
    padding: 10px 20px;
    background-color: #2980b9;
    border: none;
    border-radius: 5px;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover {
    background-color: #1c6ea4;
    transform: translateY(-2px);
}

.number-button {
    margin: 5px;
    padding: 15px;
    background-color: #27ae60;
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.number-button:hover {
    background-color: #1e8449;
    transform: scale(1.1);
}

.team-name-item {
    margin: 5px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    display: inline-block;
    color: #ffffff;
}

.team-turn-highlight {
    margin: 15px 0;
    padding: 10px;
    background-color: #f1c40f;
    color: #2c3e50;
    font-weight: bold;
    text-align: center;
    font-size: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.song-card {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    padding: 10px;
    margin: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
    color: #ffffff;
}

.song-card:hover {
    background-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
}

.song-card-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.song-choice-button {
    margin-top: 10px;
    padding: 10px 15px;
    background-color: #8e44ad;
    border-radius: 10px;
    font-size: 16px;
}

.song-choice-button:hover {
    background-color: #732d91;
}

#offline-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #1f1f1f 30%, #323232 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: #fff;
    text-align: center;
    margin-top: 20px;
}

.song-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.artist-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.song-details {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#current-song-title {
    font-size: 24px;
    font-weight: bold;
    color: #ffdf00;
}

#artist-name-display {
    font-size: 20px;
    color: #d3d3d3;
}

.lyrics-display {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    font-size: 18px;
    color: #ffffff;
    line-height: 1.5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    max-height: 300px;
}

.line-animate {
    margin-bottom: 10px;
    animation: fadeInUp 0.5s ease-out both;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.guess-options-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    padding: 15px;
    width: 100%;
    max-width: 600px;
    gap: 12px;
    background-color: #f7f9fa;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.guess-option-button {
    width: 100%;
    margin-top: 8px;
    background-color: #256fe3;
    color: #fff;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.5s;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    pointer-events: auto; /* Ensure buttons are clickable initially */
}

.guess-option-button:disabled {
    background-color: #bdc3c7; /* رنگ دکمه‌های غیرفعال */
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none; /* Prevent clicking */
}

.guess-option-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.guess-option-button.selected {
    background-color: #f1c40f; /* زرد هنگام انتخاب */
}

.guess-option-button.correct {
    background-color: #2ecc71; /* سبز برای گزینه صحیح */
    border: 2px solid #27ae60;
    color: white;
    animation: correctShake 0.5s ease-in-out;
}

.guess-option-button.wrong {
    background-color: #e74c3c; /* قرمز برای گزینه اشتباه */
    border: 2px solid #c0392b;
    color: white;
    animation: wrongShake 0.5s ease-in-out;
}

@keyframes correctShake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

@keyframes wrongShake {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.guess-option-button:focus {
    outline: none;
}

.guess-option-button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}


.team-score {
    margin: 5px;
    padding: 5px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: inline-block;
    width: 120px;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 12px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    animation: pulse 1s infinite; /* انیمیشن ضربان برای جذابیت */
}

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

#end-game-button {
    background-color: #e74c3c;
    margin-top: 20px;
    display: block;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
}

#end-game-button:hover {
    background-color: #c0392b;
}

#team-scores {
    bottom: 10px;
    width: 100%;
    text-align: center;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 5px;
    color: #ffffff;
}

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

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.confetti-container {
    position: relative;
    height: 150px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #2ecc71;
    border-radius: 8px;
    margin-top: 15px;
}

.confetti-container h3 {
    color: #fff;
    font-size: 24px;
    margin: 0;
}


/* استایل برای مودال */
.modal {
    display: none; /* مخفی در ابتدا */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7); /* پس زمینه تاریک و کم‌رنگ */
}

.modal-content {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    text-align: center;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: fadeIn 1s ease-out;
    background: linear-gradient(to right, #ffecd2, #fcb69f); /* گرادینت زیبا */
}

.modal-content h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
    font-family: 'IRANSans', 'Vazir', sans-serif;
}

.modal-content h3 {
    font-size: 28px;
    color: #ff6347;
    margin-bottom: 20px;
    font-family: 'IRANSans', 'Vazir', sans-serif;
    animation: bounce 2s infinite;
}

.modal-content #trophy-icon {
    background-image: url('trophy.png'); /* مسیر صحیح تصویر تروفی */
    background-size: contain;
    background-repeat: no-repeat;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

.btn {
    background-color: #ff6347;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    font-family: 'IRANSans', 'Vazir', sans-serif;
}

.btn:hover {
    background-color: #e53e30;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

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

#current-lyrics {
    background-color: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 15px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Vazir', sans-serif;
    color: #333;
    text-align: center;
    line-height: 2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 20px auto;
    width: 90%;
    font-size: 18px;
    position: relative;
    transition: all 0.3s ease-in-out;
}

.line-fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards;
    margin-bottom: 10px;
    transition: all 0.3s ease-in-out;
}

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

        .hint-button {
            display: block;
            margin: 10px 0;
            padding: 10px;
            background-color: #ff9800;
            color: white;
            border: none;
            border-radius: 50px;
            transition: background-color 0.3s ease;
        }
        .hint-button:hover {
            background-color: #e68900;
        }
        .hint-info {
            font-size: 14px;
            color: #777;
            margin-top: 10px;
        }
        
/* استایل برای بخش دعوت دوستان */
#invite-section {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#invite-section .section-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
}

#invite-section p {
    font-size: 16px;
    margin-bottom: 10px;
}

#invite-section .btn {
    margin-top: 10px;
}

#invite-section .table {
    margin-top: 20px;
}

#invite-section .table th, 
#invite-section .table td {
    text-align: center;
    vertical-align: middle;
}

#invite-section .table img.profile-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
        