/* تنظیمات پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #0f0f0f 100%);
    color: #f5f5f5;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 1s ease-out;
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.5); }
}

/* هدر */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 1px solid #333;
    animation: slideUp 0.8s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo i {
    font-size: 2.8rem;
    color: #fff;
    animation: pulse 2s infinite;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 1px;
}

.tagline {
    font-size: 1.1rem;
    color: #aaa;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* محتوای اصلی */
.main-content {
    animation: slideUp 1s ease-out;
}

.game-intro {
    background: rgba(30, 30, 30, 0.8);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 40px;
    border: 1px solid #444;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-intro:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.game-intro h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-intro h2:before {
    content: "";
    display: block;
    width: 10px;
    height: 30px;
    background: #fff;
    border-radius: 3px;
}

.game-intro p {
    margin-bottom: 20px;
    color: #ccc;
    font-size: 1.05rem;
}

.rules {
    background: rgba(20, 20, 20, 0.9);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    border-right: 4px solid #fff;
}

.rules h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rules ul {
    list-style-position: inside;
    padding-right: 10px;
}

.rules li {
    margin-bottom: 10px;
    color: #ddd;
    padding-right: 10px;
    position: relative;
}

.rules li:before {
    content: "•";
    color: #fff;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-right: 5px;
}

/* دکمه‌های عمل */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 50px;
}

.button-card {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    background: rgba(25, 25, 25, 0.9);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    border: 1px solid #444;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.button-card:hover {
    transform: translateY(-10px);
    border-color: #fff;
    background: rgba(30, 30, 30, 0.95);
    animation: glow 2s infinite;
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #333, #222);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 2px solid #fff;
}

.icon-wrapper i {
    font-size: 2.5rem;
    color: #fff;
}

.button-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #fff;
}

.button-card p {
    color: #aaa;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* دکمه‌ها */
.btn-primary, .btn-secondary {
    padding: 14px 30px;
    border: none;
    border-radius: 50px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 220px;
}

.btn-primary {
    background: linear-gradient(to left, #fff, #ddd);
    color: #000;
}

.btn-primary:hover {
    background: linear-gradient(to left, #fff, #fff);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

/* جداکننده */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 50px;
}

.divider:before, .divider:after {
    content: "";
    height: 1px;
    background: #555;
    width: 100px;
}

.divider span {
    padding: 0 20px;
    color: #777;
    font-weight: 500;
    background-color: #1a1a1a;
}

/* آمار */
.game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(30, 30, 30, 0.8);
    border-radius: 10px;
    padding: 25px 20px;
    text-align: center;
    min-width: 180px;
    border: 1px solid #444;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: #fff;
}

.stat-item i {
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 15px;
}

.stat-item span {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.stat-item p {
    color: #aaa;
    font-size: 0.95rem;
}

/* فوتر */
.footer {
    text-align: center;
    padding: 25px 0;
    border-top: 1px solid #333;
    color: #777;
    font-size: 0.9rem;
}

.footer i {
    color: #ff6b6b;
    margin: 0 5px;
}

.copyright {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #555;
}

/* مدال */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: #1a1a1a;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    border: 1px solid #444;
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.modal-header {
    background: rgba(30, 30, 30, 0.95);
    padding: 20px 25px;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #fff;
}

.modal-body {
    padding: 25px;
}

.modal-body p {
    margin-bottom: 20px;
    color: #ccc;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group input {
    width: 100%;
    padding: 14px;
    background: rgba(40, 40, 40, 0.8);
    border: 1px solid #555;
    border-radius: 8px;
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #fff;
}

.hint {
    font-size: 0.85rem;
    color: #777;
    margin-top: 8px;
}

.room-code-display {
    background: rgba(20, 20, 20, 0.9);
    border-radius: 10px;
    padding: 20px;
    margin-top: 25px;
    border: 1px solid #555;
}

.room-code-display p {
    margin-bottom: 15px;
    color: #fff;
    font-weight: 500;
}

.code-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(30, 30, 30, 0.9);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #666;
    margin-bottom: 15px;
}

#room-code {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 5px;
    color: #fff;
    font-family: monospace;
}

.btn-small {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #666;
    border-radius: 5px;
    color: #fff;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-footer {
    padding: 20px 25px;
    background: rgba(30, 30, 30, 0.95);
    border-top: 1px solid #444;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.modal-footer button {
    min-width: 120px;
}

/* رسپانسیو */
@media (max-width: 900px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .divider:before, .divider:after {
        width: 50px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .game-stats {
        gap: 15px;
    }
    
    .stat-item {
        min-width: 140px;
        padding: 20px 15px;
    }
    
    .stat-item span {
        font-size: 2rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer button {
        width: 100%;
    }
}