@font-face {
    font-family: 'Yekan';
    /* مسیر فونت اصلاح شد و به پوشه font اشاره می‌کند */
    src: url('../font/Yekan.eot');
    src: url('../font/Yekan.eot?#iefix') format('embedded-opentype'),
        url('../font/Yekan.woff2') format('woff2'),
        url('../font/Yekan.woff') format('woff'),
        url('../font/Yekan.ttf') format('truetype'),
        url('../font/Yekan.svg#Yekan') format('svg');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Yekan', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 10px;
    min-height: 100vh;
    display: flex;
}

#btn_reg {
    width: 100%;
}

.sidebar {
    width: 400px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin: 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-left {
    order: 1;
}

.sidebar-right {
    order: 3;
}

.ad-placeholder {
    width: 100%;
    background: linear-gradient(45deg, #f0f4ff, #e6eeff);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
    border: 2px dashed #4b6cb7;
    color: #4b6cb7;
    font-weight: 600;
}

.ad-placeholder:last-child {
    margin-bottom: 0;
}

.main-content {
    flex: 1;
    order: 2;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.container {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 900px;
    overflow: hidden;
}

header {
    background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

.user-section {
    position: absolute;
    left: 20px;
    top: 10%;
    transform: translateY(-10%);
}

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

.auth-buttons {
    display: flex;
    gap: 10px;
}

.auth-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.description {
    font-size: 14px;
    opacity: 0.9;
}

.calculator {
    padding: 20px;
}

.input-section {
    margin-bottom: 25px;
}

h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

.input-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #34495e;
}

input,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
    font-family: 'Yekan', 'Courier New', monospace;
    direction: rtl;
}

input:focus,
select:focus {
    border-color: #4b6cb7;
    outline: none;
    box-shadow: 0 0 0 2px rgba(75, 108, 183, 0.2);
}

.percentage-input {
    display: flex;
    align-items: center;
}

.percentage-input input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.percentage-symbol {
    background-color: #f1f5f9;
    padding: 0 12px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-left: none;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    font-weight: 600;
    color: #4b5563;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

button {
    background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

button:active {
    transform: translateY(0);
}

.results {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    display: none;
}

.results h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    font-size: 1.1em;
}

.result-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.result-label {
    font-weight: 600;
    color: #34495e;
}

.result-value {
    font-weight: 700;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
    direction: rtl;
}

.profit {
    color: #27ae60;
}

.loss {
    color: #e74c3c;
}

.summary {
    background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
}

.summary h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.summary p {
    font-size: 20px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    direction: ltr;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.radio-item input {
    width: auto;
}

.info-text {
    background-color: #e3f2fd;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 14px;
    color: #1976d2;
    border-right: 4px solid #1976d2;
}

@media (max-width: 1200px) {
    .sidebar {
        width: 150px;
    }
}

@media (max-width: 992px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin: 10px 0;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
    }

    .ad-placeholder {
        width: 45%;
        margin: 5px;
    }

    .sidebar-left,
    .sidebar-right {
        order: 0;
    }

    .user-section {
        position: static;
        transform: none;
        margin-top: 10px;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .ad-placeholder {
        width: 100%;
    }

    .input-columns {
        display: flex;
        gap: 20px;
    }

    .input-columns .input-group {
        flex: 1;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
}

.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: #f0f0f0;
    z-index: 1000;
}

.loading-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background-color: #4b6cb7;
    animation: loading 2s ease-in-out forwards;
}

@keyframes loading {
    to {
        width: 100%;
    }
}

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

    50% {
        transform: scale(1.07);
    }

    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite ease-in-out;
}

.usage-limit {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
    text-align: center;
    display: none;
}

.usage-limit p {
    margin-bottom: 10px;
    color: #856404;
}

.usage-limit button {
    width: auto;
    padding: 8px 16px;
    margin: 0 5px;
}

.usage-count {
    background-color: #e9ecef;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
    display: none;
}

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

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.modal-header h2 {
    margin: 0;
    border: none;
    padding: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: auto;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-footer {
    margin-top: 20px;
    text-align: center;
}

.form-footer a {
    color: #4b6cb7;
    text-decoration: none;
    cursor: pointer;
}

.form-footer a:hover {
    text-decoration: underline;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 7px;
    font-weight: bold;
    display: none;
    text-align: center;
}

#usageCount {
    color: red;
    font-size: 1.1em;
}

/* استایل برای بنر فعال‌سازی */
.verification-banner {
    background: linear-gradient(90deg, #f6d365 0%, #fda085 100%);
    color: #333;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #f0ad4e;
}

.banner-content h3 {
    margin-bottom: 10px;
}

.banner-content p {
    margin-bottom: 20px;
    font-size: 16px;
}

.banner-content .auth-btn {
    background: #fff;
    color: #f0ad4e;
    border: 2px solid #f0ad4e;
    font-weight: bold;
}

.banner-content .auth-btn:hover {
    background: #f0ad4e;
    color: #fff;
}

/* استایل‌های جدید برای مودال محدودیت OTP */
.otp-limit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.otp-limit-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    padding: 30px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

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

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

.otp-limit-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

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

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.otp-limit-title {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: bold;
}

.otp-limit-message {
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.otp-limit-timer {
    font-size: 32px;
    font-weight: bold;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 10px;
    display: inline-block;
    min-width: 120px;
}

.otp-limit-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.otp-limit-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* استایل برای نوتیفیکیشن لاگ اوت اتوماتیک */
.auto-logout-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(90deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    max-width: 400px;
    animation: slideInRight 0.5s ease-out;
}

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

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-icon {
    font-size: 24px;
}

.notification-text {
    flex: 1;
}

.notification-text strong {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

.notification-text p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

@media (max-width: 768px) {
    .auto-logout-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* استایل برای دکمه غیرفعال */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

button:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* استایل برای پیام موفقیت در OTP */
.otp-success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    color: #155724;
    padding: 10px;
    margin: 10px 0;
    text-align: center;
}

/* استایل برای دکمه غیرفعال در تایمر */
.resend-disabled {
    color: #aaa !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.resend-enabled {
    color: #4b6cb7 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

#loading {
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}