* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2196f3;
    --primary-light: #64b5f6;
    --primary-dark: #1976d2;
    --secondary-color: #4caf50;
    --secondary-light: #81c784;
    --secondary-dark: #388e3c;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --info-color: #2196f3;
    --text-color: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --divider-color: #f0f0f0;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.14);
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
    --transition-slow: all 0.4s ease;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    display: none;
}

.admin-content {
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 20px;
}

.admin-content::-webkit-scrollbar {
    display: none;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    position: relative;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 15px 0;
    box-shadow: var(--shadow-md);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header .logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header .logo::before {
    content: "🎬";
    font-size: 1.8rem;
}

.header .nav {
    display: flex;
    gap: 20px;
}

.header .nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    position: relative;
}

.header .nav-link:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.header .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.header .btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.header .btn-secondary:hover {
    background: rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .header .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .header .nav-link {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
    
    .header .user-info {
        width: 100%;
        justify-content: center;
    }
    
    .header .user-info:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.main {
    min-height: 80vh;
    padding: 20px 0;
}

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.5;
}

.hero h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

.movie-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.movie-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.movie-poster {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    position: relative;
    overflow: hidden;
}

.movie-poster::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.movie-info {
    padding: 20px;
    position: relative;
    z-index: 2;
}

.movie-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color);
}

.movie-meta {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}

.session-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.session-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.session-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.session-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.session-time {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.session-hall {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.session-price {
    font-size: 22px;
    color: var(--warning-color);
    font-weight: 700;
    margin-top: 10px;
}

.seat-map {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    margin: 30px 0;
    text-align: center;
    box-shadow: var(--shadow);
}

.screen {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    height: 8px;
    width: 80%;
    margin: 0 auto 40px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    position: relative;
}

.screen::before {
    content: '屏幕';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: var(--border-radius);
    font-size: 14px;
}

.seats-container {
    display: inline-block;
}

.seat-row {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.seat {
    width: 45px;
    height: 45px;
    margin: 0 8px;
    background: var(--success-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.seat:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.seat.occupied {
    background: var(--warning-color);
    cursor: not-allowed;
    box-shadow: var(--shadow);
}

.seat.occupied:hover {
    transform: none;
    box-shadow: var(--shadow);
}

.seat.selected {
    background: var(--primary-color);
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.order-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.order-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.order-no {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 16px;
}

.order-status {
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
}

.status-pending {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.status-paid {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.status-cancelled {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.order-body {
    display: flex;
    gap: 30px;
    align-items: center;
}

.order-movie-info {
    flex: 1;
}

.order-movie-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color);
}

.order-movie-info p {
    color: var(--text-light);
    margin-bottom: 5px;
}

.order-ticket-info {
    text-align: right;
    min-width: 150px;
}

.order-ticket-info p {
    margin-bottom: 10px;
    color: var(--text-light);
}

.order-ticket-info strong {
    font-size: 20px;
    color: var(--warning-color);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.3) 0%, rgba(76, 175, 80, 0.3) 100%);
    z-index: 1000;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--border-color);
}

.modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding: 30px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) var(--bg-color);
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.modal-small .modal-content {
    max-width: 400px;
}

.modal-medium .modal-content {
    max-width: 500px;
}

.modal-large .modal-content {
    max-width: 700px;
}

.modal-fullscreen .modal-content {
    width: 95%;
    max-width: 95%;
    height: 90vh;
    max-height: 90vh;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    border-radius: 50%;
    background: var(--bg-color);
}

.close:hover {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: rotate(90deg);
    box-shadow: var(--shadow);
}

.modal-body h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-color);
    text-align: center;
    padding-right: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-color);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #00f2fe);
    color: white;
    box-shadow: var(--shadow);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-danger {
    background: linear-gradient(135deg, var(--warning-color), #fee140);
    color: white;
    box-shadow: var(--shadow);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-color);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-submit {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.admin-layout {
    display: flex;
    min-height: 80vh;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.admin-sidebar {
    width: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 20px;
}

.admin-sidebar h2 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-sidebar h2::before {
    content: "🎬";
    font-size: 1.2rem;
}

.admin-menu {
    list-style: none;
}

.admin-menu li {
    margin-bottom: 8px;
}

.admin-menu a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px 15px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    font-size: 0.95rem;
}

.admin-menu a:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-menu a.active {
    background: rgba(255,255,255,0.3);
    font-weight: 600;
}

.admin-content {
    flex: 1;
    padding: 25px;
    background: var(--card-bg);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.admin-content::-webkit-scrollbar {
    display: none;
}

@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        border-radius: 10px 10px 0 0;
        padding: 15px;
    }
    
    .admin-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .admin-menu li {
        margin-bottom: 0;
        flex: 1;
        min-width: 120px;
    }
    
    .admin-menu a {
        text-align: center;
        justify-content: center;
        padding: 10px;
    }
    
    .admin-content {
        border-radius: 0 0 10px 10px;
        padding: 15px;
    }
    
    .admin-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .admin-actions label {
        margin-left: 0;
        justify-content: center;
    }
}

.admin-actions {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-table {
    overflow-x: auto;
    margin-top: 20px;
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 600;
}

.admin-table tr:hover {
    background: var(--bg-color);
    transition: var(--transition);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.action-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.page {
    animation: fadeIn 0.5s ease-out;
}