* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    
}

body {
    font-family: Tahoma, sans-serif;
    background-color: #f4f4f9;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.container {
    text-align: center;
    max-width: 800px;
    width: 100%;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.coin-container {
    margin: 20px;
}

.coin {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
}
.coin-image {
    width: 150px;
    height: 150px;
    transition: transform 0.6s ease;
}




h3 {
    margin-top: 20px;
    font-size: 20px;
}

button {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    margin-bottom: 20px; /* فاصله از سایر بخش‌ها */
    font-family:Tahoma;
}
button:hover {
    background-color: #2980b9;
}

.history {
    margin-top: 30px;
    text-align: left;
    margin-bottom: 30px;
}

.history table {
    width: 100%;
    border-collapse: collapse;
      direction: rtl;
}

.history th, .history td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
  /*  min-width: 120px; /* برای جلوگیری از بهم ریختگی */
}

.history th {
    background-color: #f2f2f2;
}

.history tr:nth-child(even) {
    background-color: #f9f9f9;
}

.history .profit {
    color: green;
}

.history .loss {
    color: red;
}


#investmentChart {
    margin-top: 30px;
    width: 100%;
}

.settings {
    text-align: center; /* برای وسط‌چین کردن دکمه */
    margin-top: 20px;
}
.settings-modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    padding-top: 60px;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

input[type="number"] {
    margin-top: 10px;
    padding: 8px;
    width: 100%;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}
#coinInfo {
    margin-top: 20px;
    text-align: center;
    font-family: Tahoma, sans-serif;
    font-size: 18px;
}

#coinInfo p {
    margin: 5px 5px;
}

#coinResult, #currentInvestment, #flipCount, #winRate {
    font-weight: bold;
}

#winRate {
    color: #4CAF50;  /* رنگ سبز برای وین ریت */
}
.coin-info-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
    font-family: Tahoma, sans-serif;
    font-size: 16px;
}

.coin-info-container p {
    margin: 5px 20px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    background-color: #f0f0f0;
    display: inline-block;
    text-align: center;
    min-width: 150px;
}

#coinResult, #currentInvestment {
    font-size: 18px;
}

#winStreak, #lossStreak {
    color: #ff6347;  /* قرمز برای باخت‌ها */
}

#winRate {
    color: #4CAF50;  /* سبز برای وین ریت */
}

#flipCount {
    color: #2196F3;  /* آبی برای تعداد پرتاب‌ها */
}

#winStreak {
    background-color: #dff0d8;  /* پس زمینه سبز برای برد */
}

#lossStreak {
    background-color: #f2dede;  /* پس زمینه قرمز برای باخت */
}
.coin-info-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    font-family: Tahoma, sans-serif;
    font-size: 16px;
    text-align: right;  /* متن از راست به چپ نمایش داده شود */
}

.first-row, .second-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.first-row p, .second-row p {
    margin: 5px 20px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    background-color: #f0f0f0;
    display: inline-block;
    text-align: center;
    min-width: 150px;
}

#coinResult, #currentInvestment {
    font-size: 18px;
}

#winStreak, #lossStreak {
    color: #ff6347;  /* قرمز برای باخت‌ها */
}

#winRate {
    color: #4CAF50;  /* سبز برای وین ریت */
}

#flipCount {
    color: #2196F3;  /* آبی برای تعداد پرتاب‌ها */
}

#winStreak {
    background-color: #dff0d8;  /* پس زمینه سبز برای برد */
}

#lossStreak {
    background-color: #f2dede;  /* پس زمینه قرمز برای باخت */
}

/* سکه وسط صفحه */
#coin {
    display: block;
    margin: 20px auto;
    width: 150px;
    height: 150px;
}


/* تنظیمات کلی */
.coin-info-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    font-family: Tahoma, sans-serif;
    font-size: 16px;
    text-align: right;  /* نمایش متن از راست به چپ */
    width: 100%;
    padding: 0 10px;  /* فاصله داخلی برای گوشی‌ها */
}

/* تنظیمات برای ردیف‌ها */
.first-row, .second-row {
    display: flex;
    flex-wrap: wrap;  /* اجازه می‌دهیم که وقتی فضای کم است، آیتم‌ها به خط بعدی بروند */
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.first-row p, .second-row p {
    margin: 5px 10px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    background-color: #f0f0f0;
    text-align: center;
    min-width: 120px;
    width: auto;
    box-sizing: border-box; /* محاسبه اندازه‌ها با در نظر گرفتن padding */
}

#coinResult, #currentInvestment {
    font-size: 18px;
}

/* تنظیمات مربوط به تعداد بردها و باخت‌ها */
#winStreak, #lossStreak {
    color: #ff6347;  /* قرمز برای باخت‌ها */
}

#winRate {
    color: #4CAF50;  /* سبز برای وین ریت */
}

#flipCount {
    color: #2196F3;  /* آبی برای تعداد پرتاب‌ها */
}

#winStreak {
    background-color: #dff0d8;  /* پس زمینه سبز برای برد */
}

#lossStreak {
    background-color: #f2dede;  /* پس زمینه قرمز برای باخت */
}

/* استایل برای سکه */
#coin {
    display: block;
    margin: 20px auto;
    width: 150px;
    height: 150px;
}

/* جدول تاریخچه */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    text-align: center;
    padding: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
}

table th {
    background-color: #f2f2f2;
}

table td {
    background-color: #f9f9f9;
}

table tr:nth-child(even) td {
    background-color: #f1f1f1;
}

@media (max-width: 600px) {
    .coin-info-container {
        padding: 0 5px;
        font-size: 14px;  /* اندازه متن کوچکتر در صفحه گوشی */
    }

    .first-row p, .second-row p {
        min-width: 100px; /* کاهش عرض به اندازه مناسب برای موبایل */
        margin: 3px 5px;
        font-size: 14px;
    }

    #coin {
        width: 120px;
        height: 120px;
    }

    table th, table td {
        font-size: 12px; /* کوچک کردن سایز فونت برای گوشی */
        padding: 6px;
    }
}
