* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

body {
    direction: rtl;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.5s ease;
}

.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.container {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 2.5em;
    text-align: center;
    color: #1e88e5;
    margin-bottom: 20px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.input-section {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

#inputChar {
    width: 70%;
    padding: 15px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s ease;
}

#inputChar:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 10px rgba(30, 136, 229, 0.3);
}

#countButton {
    padding: 15px 30px;
    font-size: 18px;
    background: #1e88e5;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

#countButton:hover {
    background: #1565c0;
    transform: scale(1.05);
}

.summary {
    text-align: center;
    font-size: 18px;
    margin: 20px 0;
    color: #333;
}

.results {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.results .column {
    flex: 1;
    min-width: 45%;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.results .column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.results h2 {
    font-size: 20px;
    color: #1e88e5;
}

.results ul {
    list-style: none;
}

.results li {
    margin-bottom: 15px;
    font-size: 18px;
    line-height: 1.6;
}

.results .highlight {
    background: #ffeb3b;
    padding: 2px 5px;
    border-radius: 5px;
}

/* دکمه شناور تنظیمات */
.floating-settings {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: #1e88e5;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
    z-index: 3;
}

.floating-settings:hover {
    transform: scale(1.1);
    background: #1565c0;
}

/* دکمه شناور تم */
.floating-theme {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: #1e88e5;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
    z-index: 3;
}

.floating-theme:hover {
    transform: scale(1.1);
    background: #1565c0;
}

/* مودال تنظیمات */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.modal-content {
    background: white;
    margin: 15% auto;
    padding: 20px;
    width: 300px;
    border-radius: 10px;
    text-align: center;
}

.close {
    float: left;
    font-size: 24px;
    cursor: pointer;
}

.modal-content label {
    display: block;
    margin: 10px 0 5px;
}

.filter-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
}

/* استایل سوئیچ */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #1e88e5;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.modal-content input[type="range"], .modal-content input[type="color"] {
    width: 100%;
}

#saveSettings {
    margin-top: 20px;
    padding: 10px 20px;
    background: #1e88e5;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

/* حالت تاریک */
body.dark-theme {
    background: linear-gradient(135deg, #1e1e1e 0%, #37474f 100%);
}

body.dark-theme .container, body.dark-theme .results .column {
    background: rgba(50, 50, 50, 0.8);
    color: #fff;
}

body.dark-theme .summary {
    color: #ddd;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .results {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .results .column {
        min-width: 48%;
    }

    #inputChar {
        width: 100%;
    }

    .container {
        width: 95%;
        padding: 20px;
    }
}