* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
    position: relative;
    overflow-x: hidden;
    padding: 0;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 0 20px;
    height: 60px;
    border-bottom: 3px solid #f1c40f;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    font-size: 24px;
    font-weight: 700;
    color: #f1c40f;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 15px;
}

.nav-select {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    color: #ecf0f1;
    outline: none;
}

.nav-select option {
    color: #2c3e50;
}

.nav-links {
    display: flex;
    gap: 10px;
}

.nav-link {
    color: #ecf0f1;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background: rgba(52, 152, 219, 0.3);
}

.nav-link.active {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    color: #2c3e50;
}

.nav-mobile-toggle {
    display: none;
    color: #ecf0f1;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

.page-content {
    padding: 20px;
    min-height: calc(100vh - 60px);
}

.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    height: calc(100vh - 100px);
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

body.layout-grid .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
}

body.layout-vertical .container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: auto;
}

.area {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    border: 1px solid #eaeaea;
    overflow: hidden;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.area:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.area-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.area-header .area-title {
    margin-bottom: 20px;
    text-align: left;
    flex: 1;
}

.area-meta {
    font-size: 14px;
    font-weight: 600;
    color: #7f8c8d;
    white-space: nowrap;
}

.area-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 3px solid;
    position: relative;
}

.area-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 25%;
    width: 50%;
    height: 3px;
    background: currentColor;
}

#area-shuangshuang {
    border-top: 6px solid #e74c3c;
}

#area-shuangshuang .area-title {
    color: #e74c3c;
}

#area-lele {
    border-top: 6px solid #3498db;
}

#area-lele .area-title {
    color: #3498db;
}

#area-kuai-le {
    border-top: 6px solid #2ecc71;
}

#area-kuai-le .area-title {
    color: #2ecc71;
}

#result-area {
    border-top: 6px solid #9b59b6;
    grid-column: 2;
    grid-row: 2;
}

#result-area .area-title {
    color: #9b59b6;
}

.buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    user-select: none;
}

.checkbox-inline input {
    width: 16px;
    height: 16px;
}

.btn {
    padding: 16px 28px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-shuangshuang {
    background: linear-gradient(to right, #e74c3c, #c0392b);
    color: white;
}

.btn-lele {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
}

.btn-kuaile {
    background: linear-gradient(to right, #2ecc71, #27ae60);
    color: white;
}

.complex-selector {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

.complex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.complex-select {
    padding: 10px 15px;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.complex-select:focus {
    outline: none;
    border-color: #3498db;
}

.complex-select-small {
    min-width: 60px;
}

.complex-label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.btn-complex {
    padding: 10px 20px;
    font-size: 14px;
    min-width: auto;
}

.instructions {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 15px;
    text-align: center;
    line-height: 1.5;
}

.result-wrapper {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 15px;
}

.result-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 120px;
    min-width: 120px;
    padding: 15px 10px;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    border-radius: 10px;
    color: white;
}

.result-title-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: 5px;
}

.camera-icon {
    background: white;
    color: #9b59b6;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: none;
    margin-top: auto;
}

.camera-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.result-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background-color: rgba(249, 249, 249, 0.9);
    border-radius: 10px;
    padding: 15px;
    position: relative;
}

.result-right-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.result-info {
    font-size: 14px;
    color: #7f8c8d;
}

.fullscreen-btn {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.fullscreen-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}

.result-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 5px;
}

.result-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.pager-btn {
    background: rgba(155, 89, 182, 0.12);
    color: #8e44ad;
    border: 1px solid rgba(155, 89, 182, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 90px;
}

.pager-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pager-info {
    font-size: 14px;
    font-weight: 700;
    color: #555;
}

.result-content::-webkit-scrollbar {
    width: 6px;
}

.result-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.result-content::-webkit-scrollbar-thumb {
    background: #9b59b6;
    border-radius: 3px;
}

.lottery-result {
    background-color: white;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.lottery-title {
    font-size: 12px;
    color: #7f8c8d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lottery-type {
    font-weight: 600;
    color: #555;
}

.lottery-time {
    font-size: 11px;
    color: #999;
}

.number-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.number:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.red-ball {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
}

.blue-ball {
    background: linear-gradient(145deg, #3498db, #2980b9);
}

.plus {
    font-size: 20px;
    color: #7f8c8d;
    margin: 0 6px;
    font-weight: 700;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #95a5a6;
    text-align: center;
    flex: 1;
}

.empty-state i {
    font-size: 50px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.blessing-container {
    position: fixed;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 50;
    width: 100px;
    height: 131px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.blessing-container.show {
    opacity: 0.9;
}

.blessing-image {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

.blessing-message {
    position: fixed;
    top: 41%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #FFD700, #FFA000);
    color: #8B0000;
    padding: 20px 40px;
    border-radius: 50px;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    z-index: 150;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 4px solid #FFA000;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.7);
}

.blessing-message.show {
    animation: blessingPopup 3s ease-out forwards;
}

@keyframes blessingPopup {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    30% { transform: translate(-50%, -50%) scale(1); }
    70% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
}

.gold-particle {
    position: fixed;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #FFD700, #FFA000);
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 0 10px #FFD700;
}

.notification {
    position: fixed;
    top: 80px;
    right: 30px;
    padding: 20px 25px;
    background: #2ecc71;
    color: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(150%);
    transition: transform 0.5s ease;
    max-width: 350px;
}

.notification.show {
    transform: translateX(0);
}

.notification i {
    font-size: 28px;
}

.notification-content h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.notification.error {
    background: #e74c3c;
}

.notification.warning {
    background: #f39c12;
}

.notification.info {
    background: #3498db;
}

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.dialog-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.choice-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    text-align: center;
    max-width: 90%;
    width: 400px;
    opacity: 0;
    transition: all 0.3s ease;
    border: 5px solid #e74c3c;
}

.choice-dialog.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.choice-dialog h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.choice-dialog p {
    font-size: 16px;
    margin-bottom: 30px;
    color: #666;
    line-height: 1.5;
}

.choice-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.choice-btn {
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.choice-btn.confirm {
    background: linear-gradient(to right, #2ecc71, #27ae60);
    color: white;
}

.choice-btn.cancel {
    background: linear-gradient(to right, #e74c3c, #c0392b);
    color: white;
}

.choice-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.fullscreen-mode {
    position: fixed !important;
    top: 70px !important;
    left: 20px !important;
    right: 20px !important;
    bottom: 20px !important;
    width: calc(100% - 40px) !important;
    height: calc(100vh - 90px) !important;
    z-index: 10000 !important;
    transform: none !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4) !important;
    animation: fullscreenIn 0.5s ease-out !important;
    max-width: none !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border: 2px solid #9b59b6 !important;
}

@keyframes fullscreenIn {
    0% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.fullscreen-mode .result-wrapper {
    height: 100%;
}

.fullscreen-mode .result-content {
    overflow-y: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fullscreen-mode .lottery-result {
    flex: 1;
    min-height: 0;
    justify-content: center;
    padding: 15px;
}

.fullscreen-mode .lottery-title {
    font-size: 16px;
    margin-bottom: 10px;
}

.fullscreen-mode .number {
    width: 50px;
    height: 50px;
    font-size: 22px;
}

.fullscreen-mode .plus {
    font-size: 28px;
    margin: 0 10px;
}

.auth-container {
    max-width: 450px;
    margin: 50px auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.auth-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.auth-btn {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.results-container {
    max-width: 900px;
    margin: 30px auto;
}

.results-header {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.results-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
}

.results-subtitle {
    font-size: 14px;
    color: #7f8c8d;
    text-align: center;
}

.result-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-left: 5px solid;
}

.result-card.ssq {
    border-left-color: #e74c3c;
}

.result-card.dlt {
    border-left-color: #3498db;
}

.result-card.kl8 {
    border-left-color: #2ecc71;
}

.result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.result-card-title {
    font-size: 20px;
    font-weight: 700;
}

.result-card-date {
    font-size: 14px;
    color: #7f8c8d;
}

.result-card-period {
    font-size: 14px;
    color: #999;
    margin-bottom: 15px;
}

.result-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.user-container {
    max-width: 1000px;
    margin: 30px auto;
}

.user-header {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
}

.user-info h2 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.user-info p {
    font-size: 14px;
    color: #7f8c8d;
}

.user-tabs {
    display: flex;
    background: white;
    border-radius: 15px;
    padding: 5px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.user-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #7f8c8d;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.user-tab.active {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

.user-content {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.user-panel {
    display: none;
}

.user-panel.active {
    display: block;
}

.record-item {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #eee;
}

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

.record-type {
    font-weight: 600;
    color: #555;
}

.record-time {
    font-size: 12px;
    color: #999;
}

.admin-container {
    max-width: 1200px;
    margin: 30px auto;
}

.admin-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    color: white;
}

.admin-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.admin-subtitle {
    font-size: 14px;
    opacity: 0.8;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.admin-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.admin-card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-card-title i {
    color: #9b59b6;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    font-weight: 600;
    color: #555;
    background: #f9f9f9;
}

.admin-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-btn-primary {
    background: #3498db;
    color: white;
}

.admin-btn-danger {
    background: #e74c3c;
    color: white;
}

.admin-btn-success {
    background: #2ecc71;
    color: white;
}

.install-container {
    max-width: 600px;
    margin: 50px auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.install-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: #2c3e50;
}

.install-subtitle {
    font-size: 14px;
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 30px;
}

.match-indicator {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.match-indicator.win {
    background: #d4edda;
    color: #155724;
}

.match-indicator.partial {
    background: #fff3cd;
    color: #856404;
}

.logout-btn {
    background: linear-gradient(to right, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

@media (max-width: 992px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        height: auto;
    }

    body.layout-grid .container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-rows: auto auto;
        height: auto;
    }

    body.layout-vertical .container {
        display: flex;
        flex-direction: column;
        gap: 15px;
        height: auto;
    }
    
    #result-area {
        grid-column: 1;
        grid-row: 4;
        min-height: 500px;
    }

    body.layout-grid #result-area {
        grid-column: 2;
        grid-row: 2;
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        flex-direction: column;
        padding: 20px;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.show {
        transform: translateY(0);
    }
    
    .nav-mobile-toggle {
        display: block;
    }

    .nav-center {
        display: flex;
    }
    
    .container {
        display: flex;
        flex-direction: column;
        gap: 15px;
        height: auto;
    }

    body.layout-grid .container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-rows: auto auto;
        height: auto;
    }
    
    .area {
        padding: 20px;
    }
    
    .area-title {
        font-size: 24px;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 16px;
        min-width: 140px;
    }
    
    .result-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .result-left {
        width: 100%;
        min-width: auto;
        flex-direction: row;
        justify-content: space-between;
        padding: 15px;
    }
    
    .result-title-vertical {
        writing-mode: horizontal-tb;
        letter-spacing: normal;
        margin-bottom: 0;
        font-size: 22px;
    }
    
    .camera-icon {
        margin-top: 0;
        width: 45px;
        height: 45px;
    }
    
    .number {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .plus {
        font-size: 18px;
        margin: 0 5px;
    }
    
    .blessing-message {
        font-size: 22px;
        padding: 15px 30px;
    }
    
    .choice-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .choice-btn {
        width: 100%;
        min-width: auto;
    }
    
    .complex-row {
        flex-direction: column;
    }
    
    .complex-select {
        width: 100%;
    }
    
    .btn-complex {
        width: 100%;
    }
    
    .fullscreen-mode {
        top: 65px !important;
        left: 10px !important;
        right: 10px !important;
        bottom: 10px !important;
        width: calc(100% - 20px) !important;
        height: calc(100vh - 75px) !important;
    }
    
    .fullscreen-mode .number {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .fullscreen-mode .plus {
        font-size: 22px;
        margin: 0 8px;
    }
    
    .user-header {
        flex-direction: column;
        text-align: center;
    }
    
    .user-tabs {
        flex-wrap: wrap;
    }
    
    .user-tab {
        flex: 0 0 50%;
    }
}

@media (max-width: 576px) {
    .page-content {
        padding: 15px;
    }
    
    .buttons-container {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        min-width: auto;
    }
    
    .area {
        padding: 15px;
    }
    
    .area-title {
        font-size: 22px;
    }
    
    .number {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    
    .auth-container {
        margin: 20px;
        padding: 25px;
    }
}
