html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazir', system-ui, sans-serif;
}

body {
    background-color: #0a0a0a;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(76, 175, 80, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(33, 150, 243, 0.1) 0%, transparent 50%);
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
    background: rgba(20, 20, 20, 0.4);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 32px rgba(255, 255, 255, 0.05);
    position: relative;
    padding: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 0 32px rgba(255, 255, 255, 0.08);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    z-index: 1;
    pointer-events: none;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.location {
    display: flex;
    align-items: center;
    gap: 12px;
}

.location-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.location-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: bold;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
}

.status.active {
    color: #2ca560;
    border: 1px solid rgba(46, 139, 87, 0.3);
    background: rgba(47, 149, 91, 0.15);
    box-shadow: 0 2px 6px rgba(46, 139, 87, 0.2);
}

.status.inactive {
    color: #B22222;
    border: 1px solid rgba(178, 34, 34, 0.3);
    background: rgba(178, 34, 34, 0.15);
    box-shadow: 0 2px 6px rgba(178, 34, 34, 0.2);
}


.dns-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    font-weight: 500;
}

.dns-entry {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 12px;
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    direction: ltr; /* اضافه کردن این خط */
    white-space: nowrap; /* جلوگیری از شکسته شدن آدرس‌ها */
}

.dns-entry:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

.dns-entry.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.2);
}

.copy-button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.copy-button:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.copy-button i {
    font-size: 1.2em;
}

.wireguard-card select {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wireguard-card select:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.wireguard-card select:focus {
    outline: none;
    border-color: rgba(33, 150, 243, 0.5);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.download-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #0D47A1, #1565C0);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.download-btn:hover {
    background: linear-gradient(45deg, #1565C0, #1976D2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(21, 101, 192, 0.9);
    padding: 12px 24px;
    border-radius: 12px;
    display: none;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
