@import url('https://fonts.googleapis.com/css2?family=Vazir:wght@100;200;300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', 'Tahoma', sans-serif;
    direction: rtl;
    text-align: right;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.header h1 {
    color: #4a5568;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header p {
    color: #718096;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Card Styles */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    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.15);
}

.card-title {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 1rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Vazir', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: #a0aec0;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-family: 'Vazir', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 101, 101, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(160, 174, 192, 0.3);
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table th,
.table td {
    padding: 14px 18px;
    text-align: center;
    font-size: 1.08rem;
}

.table tbody tr {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px #0001;
    transition: box-shadow 0.2s, background 0.2s;
    margin-bottom: 12px;
    overflow: hidden;
}

.table tbody tr:nth-child(even) {
    background: #f3f4f6;
}

.table tbody tr td {
    border-bottom: none !important;
}

.table tbody tr:not(:last-child) {
    margin-bottom: 16px;
}

.table th, .table td {
    vertical-align: middle;
}

.table th {
    background: #7c3aed;
    color: #fff;
    font-weight: bold;
    border-bottom: 2px solid #d1d5db;
    font-size: 1.13rem;
    box-shadow: 0 2px 8px #7c3aed22;
    letter-spacing: 0.5px;
}

.table td {
    border-bottom: 1px solid #e5e7eb;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Alert Styles */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(72, 187, 120, 0.1);
    border-color: #48bb78;
    color: #2f855a;
}

.alert-danger {
    background: rgba(245, 101, 101, 0.1);
    border-color: #f56565;
    color: #c53030;
}

.alert-warning {
    background: rgba(237, 137, 54, 0.1);
    border-color: #ed8936;
    color: #c05621;
}

.alert-info {
    background: rgba(66, 153, 225, 0.1);
    border-color: #4299e1;
    color: #2b6cb0;
}

/* Lottery Code Display */
.lottery-code {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    margin: 10px 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    letter-spacing: 2px;
}

/* Admin Panel Styles */
.admin-sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.admin-menu {
    list-style: none;
    padding: 0;
}

.admin-menu li {
    margin-bottom: 10px;
}

.admin-menu a {
    display: block;
    padding: 12px 16px;
    color: #4a5568;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.admin-menu a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(-5px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        max-width: 98vw;
        padding: 10px;
    }
    .header, .card {
        padding: 18px 8px;
    }
    .header h1, .card-title, h2, h3 {
        font-size: 1.3rem !important;
    }
    .main-content {
        padding: 0 2px !important;
    }
}
@media (max-width: 768px) {
    .container {
        max-width: 100vw;
        padding: 6px;
    }
    .header, .card {
        padding: 12px 4px;
        border-radius: 14px;
        margin-bottom: 14px;
    }
    .header h1, .card-title, h2, h3 {
        font-size: 1.1rem !important;
    }
    .form-label, .form-control, .btn, .alert, .table th, .table td {
        font-size: 0.97rem !important;
    }
    .btn, .btn-primary, .btn-danger, .btn-success, .btn-secondary {
        width: 100% !important;
        min-width: unset;
        margin-bottom: 8px;
        padding: 10px 0 !important;
        font-size: 1rem !important;
    }
    img[alt="لوگو"] {
        width: 44px !important;
        height: 44px !important;
        margin-bottom: 8px;
    }
    .main-content {
        padding: 0 !important;
    }
    /* جدول اسکرول‌پذیر */
    table, .table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table th, .table td {
        min-width: 100px;
        padding: 8px 4px;
    }
}
@media (max-width: 480px) {
    .container {
        padding: 2px;
    }
    .header, .card {
        padding: 8px 2px;
        border-radius: 10px;
        margin-bottom: 10px;
    }
    .header h1, .card-title, h2, h3 {
        font-size: 1rem !important;
    }
    .form-label, .form-control, .btn, .alert, .table th, .table td {
        font-size: 0.93rem !important;
    }
    .btn, .btn-primary, .btn-danger, .btn-success, .btn-secondary {
        width: 100% !important;
        min-width: unset;
        margin-bottom: 8px;
        padding: 9px 0 !important;
        font-size: 0.98rem !important;
    }
    img[alt="لوگو"] {
        width: 36px !important;
        height: 36px !important;
        margin-bottom: 6px;
    }
    .main-content {
        padding: 0 !important;
    }
    table, .table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table th, .table td {
        min-width: 90px;
        padding: 6px 2px;
    }
}
@media (max-width: 600px) {
    .container {
        max-width: 100vw !important;
        width: 100vw !important;
        min-width: 0 !important;
        padding: 0 !important;
    }
    body {
        padding: 0 !important;
        margin: 0 !important;
    }
    .card {
        width: 95vw !important;
        min-width: unset !important;
        max-width: 98vw !important;
        margin: 0 auto 16px auto !important;
    }
    .alert, .alert-warning, .alert-success, .alert-danger {
        width: 100% !important;
        max-width: 98vw !important;
        min-width: unset !important;
        word-break: normal !important;
        white-space: normal !important;
        text-align: center !important;
        margin: 0 auto 12px auto !important;
        font-size: 1rem !important;
        line-height: 2 !important;
        padding: 12px 8px !important;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* File Upload Styles */
.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.file-upload input[type=file] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: block;
    padding: 12px 16px;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    text-align: center;
    color: #718096;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
}

.file-upload:hover .file-upload-label {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

/* Statistics Cards */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stats-label {
    font-size: 1rem;
    opacity: 0.9;
}

.card, .table {
    box-shadow: 0 2px 16px rgba(102,126,234,0.08) !important;
    border-radius: 18px !important;
}
.alert, .alert-warning, .alert-success, .alert-danger {
    font-size: 1.08rem !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 8px #fef08a44 !important;
}
.btn-danger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.1rem !important;
}
.btn-danger::before {
    content: "🚪";
    font-size: 1.2em;
}
.table tr:nth-child(even) {
    background: #f3f4f6 !important;
}
.table th {
    background: linear-gradient(90deg,#ede9fe,#c7d2fe) !important;
    color: #7c3aed !important;
}
.table td {
    color: #0e7490 !important;
} 