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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    background: white;
    margin: 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 30px rgba(0,0,0,0.1);
}

.main-nav {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 80px;
}

.logo-link {
    text-decoration: none;
    color: white;
}

.nav-brand h2 {
    color: white;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    display: block;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-weight: 500;
    position: relative;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.nav-links a.active {
    background: rgba(52, 152, 219, 0.8);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-buttons {
    display: flex;
    gap: 0.8rem;
}

.user-welcome {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
}

.auth-btn {
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.login-btn {
    background: rgba(52, 152, 219, 0.9);
    color: white;
    border: 2px solid #3498db;
}

.login-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.register-btn {
    background: rgba(46, 204, 113, 0.9);
    color: white;
    border: 2px solid #2ecc71;
}

.register-btn:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

.logout-btn {
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: 2px solid #e74c3c;
}

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

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 6rem 2rem;
    margin-bottom: 3rem;
    border-radius: 0 0 30px 30px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    font-weight: 800;
}

.hero p {
    font-size: 1.4rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.link-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.link-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.link-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.link-card p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

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

.theatres-page,
.premieres-page {
    padding: 3rem 0;
}

.theatres-page h1,
.premieres-page h1 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: #2c3e50;
    font-weight: 800;
}

.theatres-grid,
.premieres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.theatre-card,
.premiere-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.theatre-card:hover,
.premiere-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.theatre-image,
.premiere-image {
    width: 100%;
    height: 250px;
    margin-bottom: 1.5rem;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theatre-image img,
.premiere-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.theatre-card:hover .theatre-image img,
.premiere-card:hover .premiere-image img {
    transform: scale(1.05);
}

.theatre-card h3,
.premiere-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
}

.theatre-card p,
.premiere-card p {
    margin-bottom: 0.8rem;
    color: #555;
    line-height: 1.5;
}

.theatre-card strong,
.premiere-card strong {
    color: #2c3e50;
}

.premiere-info-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    width: 100%;
    cursor: not-allowed;
    opacity: 0.7;
}

.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 450px;
    position: relative;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 2.5rem;
    color: #2c3e50;
    font-size: 2.2rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.7rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.2rem 2rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.auth-links {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.auth-modal {
    max-width: 450px;
}

.auth-modal .modal-body {
    padding: 20px 30px;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    color: #6c757d;
}

.auth-tab.active {
    border-bottom-color: #667eea;
    color: #667eea;
}

.auth-tab:hover {
    color: #667eea;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.auth-error {
    color: #e74c3c;
    background: #fee;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #e74c3c;
    font-size: 0.9rem;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    border-left: 4px solid;
}

.alert-error {
    background: #fee;
    border-color: #e74c3c;
    color: #721c24;
}

.alert-success {
    background: #eff8ff;
    border-color: #3498db;
    color: #004085;
}

footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 3rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.footer-links a:hover {
    color: #3498db;
}

.payment-methods {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.payment-methods img {
    height: 35px;
    width: auto;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.seats-modal {
    background: white;
    margin: 2% auto;
    border-radius: 12px;
    width: 95%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    border-bottom: 1px solid #34495e;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-modal {
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
    padding: 5px;
}

.close-modal:hover {
    color: #ff6b6b;
}

.modal-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: calc(90vh - 80px);
}

.performance-header-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #eff5ed;
    margin-bottom: 5px;
}

.performance-header-info p {
    color: #eff5ed;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

.seats-container {
    flex: 1;
    padding: 20px 30px;
    overflow-y: auto;
}

.stage-container {
    text-align: center;
    margin-bottom: 30px;
}

.stage-label {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 40px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.seats-layout {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

/* СЕТКА МЕСТ - ОСНОВНЫЕ СТИЛИ */
.seats-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    max-width: 500px;
}

.seat {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.seat::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: 4px;
    background: currentColor;
    opacity: 0.1;
}

.seat.free {
    background-color: #27ae60;
    color: white;
    border-color: #219a52;
}

.seat.free:hover {
    background-color: #219a52;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

.seat.occupied {
    background-color: #e74c3c;
    color: white;
    cursor: not-allowed;
    opacity: 0.7;
    border-color: #c0392b;
}

.seat.selected {
    background-color: #f39c12;
    color: white;
    border-color: #d35400;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

.seat.vip {
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: #333;
    border-color: #ff8c00;
}

.seat.vip.free:hover {
    background: linear-gradient(135deg, #ffa500, #ff8c00);
    transform: scale(1.1);
}

.seat-row-label {
    grid-column: 1 / -1;
    text-align: center;
    font-weight: bold;
    color: #6c757d;
    margin: 10px 0 5px 0;
}

.seats-legend {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
    flex-wrap: wrap;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.seat-legend {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid transparent;
}

.seat-legend.free {
    background-color: #27ae60;
    border-color: #219a52;
}

.seat-legend.occupied {
    background-color: #e74c3c;
    border-color: #c0392b;
}

.seat-legend.selected {
    background-color: #f39c12;
    border-color: #d35400;
}

.seat-legend.vip {
    background: linear-gradient(135deg, #ffd700, #ffa500);
    border-color: #ff8c00;
}

.booking-summary {
    background: #f8f9fa;
    padding: 25px 30px;
    border-top: 1px solid #e9ecef;
}

.booking-summary h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.summary-items {
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item.total {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid #bdc3c7;
}

.summary-label {
    color: #6c757d;
}

.summary-value {
    color: #2c3e50;
    font-weight: 500;
}

.booking-actions {
    display: flex;
    gap: 15px;
}

.confirm-btn {
    flex: 1;
    padding: 15px;
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.confirm-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #219a52, #1e8449);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.3);
}

.confirm-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cancel-btn {
    padding: 15px 25px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-loading {
    display: none;
}

.confirm-btn.loading .btn-text {
    display: none;
}

.confirm-btn.loading .btn-loading {
    display: inline;
}

.afisha-page {
    padding: 40px 0;
    background-color: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.page-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 40px;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.performances-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.performance-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.performance-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.performance-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.performance-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.performance-card:hover .performance-image img {
    transform: scale(1.05);
}

.theatre-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.theatre-opera {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.theatre-drama {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.theatre-puppet {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.performance-info {
    padding: 25px;
}

.performance-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.3;
}

.performance-details {
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #5a6c7d;
}

.detail-icon {
    margin-right: 10px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.price-section {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #27ae60;
}

.price-note {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.select-seats-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.select-seats-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.modal-content {
    background-color: white;
    margin: 2% auto;
    border-radius: 15px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 25px 30px 0;
    border-bottom: 1px solid #e9ecef;
}

.performance-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex: 1;
}

.performance-image-small {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.performance-image-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.performance-header-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #eff5ed;
    margin-bottom: 5px;
}

.performance-header-info p {
    color: #eff5ed;
    font-weight: 600;
    font-size: 1.1rem;
}

.modal-body {
    padding: 30px;
}

.performance-info-modal {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item strong {
    color: #2c3e50;
    font-size: 0.9rem;
}

.info-item span {
    color: #5a6c7d;
    font-weight: 600;
}

.seats-container-afisha {
    margin-bottom: 30px;
}

.stage-container-afisha {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    position: relative;
}

.stage-container-afisha::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 10px;
    background: linear-gradient(135deg, #e67e22, #d35400);
    border-radius: 5px 5px 0 0;
}

.stage-label-afisha {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.seats-layout-afisha {
    background: #ecf0f1;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.seats-grid-afisha {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.seats-legend-afisha {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.booking-summary-afisha {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.booking-summary-afisha h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.summary-items-afisha {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.summary-item-afisha {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.summary-item-afisha.total {
    border-bottom: none;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    padding-top: 15px;
    border-top: 2px solid #667eea;
}

.summary-label-afisha {
    color: #5a6c7d;
}

.summary-value-afisha {
    font-weight: 600;
    color: #2c3e50;
}

.summary-item-afisha.total .summary-value-afisha {
    color: #27ae60;
    font-size: 1.3rem;
}

.booking-actions-afisha {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.feedback-content,
.agreement-content {
    padding: 20px;
    line-height: 1.6;
}

.contact-email {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.email-link {
    color: #667eea;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    margin-left: 10px;
}

.email-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.contact-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.contact-info p {
    margin: 8px 0;
    color: #555;
}

.agreement-text {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.agreement-text h3 {
    color: #2c3e50;
    margin: 25px 0 15px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.agreement-text h3:first-child {
    margin-top: 0;
}

.agreement-text p {
    margin-bottom: 12px;
    color: #444;
}

.agreement-text ul {
    margin: 10px 0 15px 20px;
    color: #444;
}

.agreement-text li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.agreement-date {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 2px solid #e9ecef;
    font-style: italic;
    color: #666;
}

.agreement-text::-webkit-scrollbar {
    width: 6px;
}

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

.agreement-text::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.agreement-text::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ========== МЕДИА-ЗАПРОСЫ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ ========== */

@media (max-width: 1024px) {
    .nav-container {
        padding: 0 1rem;
    }
    .nav-links {
        gap: 1rem;
    }
    .nav-links a {
        padding: 0.8rem 1rem;
    }
    .hero h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        gap: 1rem;
    }
    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    .nav-links a {
        text-align: center;
        padding: 1rem;
    }
    .nav-auth {
        width: 100%;
        justify-content: center;
    }
    .auth-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    .auth-btn {
        width: 100%;
    }
    .hero {
        padding: 4rem 1rem;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
    .quick-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 1rem;
    }
    .theatres-grid,
    .premieres-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .container {
        padding: 1rem;
    }
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    .payment-methods {
        justify-content: center;
    }

    /* УЛУЧШЕНИЯ ДЛЯ ПЛАНШЕТОВ */
    .seats-modal {
        width: 98%;
        margin: 1% auto;
        max-height: 95vh;
    }
    .modal-header {
        padding: 15px 20px;
    }
    .modal-header h2 {
        font-size: 1.3rem;
    }
    .seats-container {
        padding: 15px 20px;
    }
    .seats-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 10px;
        max-width: 100%;
    }
    .seat {
        width: auto;
        height: 44px;
        font-size: 0.9rem;
    }
    .stage-label {
        padding: 12px 30px;
        font-size: 1rem;
    }
    .seats-legend {
        gap: 15px;
        padding: 12px;
    }
    .booking-summary {
        padding: 20px;
    }
    .booking-actions {
        flex-direction: column;
    }
    .cancel-btn {
        order: -1;
    }
    .performance-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
    .auth-container {
        margin: 1rem;
        padding: 2rem;
    }
    .afisha-page {
        padding: 20px 0;
    }
    .page-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    .performances-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    .modal-header {
        flex-direction: column;
        gap: 15px;
        padding: 20px 20px 0;
    }
    .performance-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .modal-body {
        padding: 20px;
    }
    .seats-grid-afisha {
        grid-template-columns: repeat(8, 1fr);
        gap: 8px;
    }
    .booking-actions-afisha {
        flex-direction: column;
    }
    .confirm-btn,
    .cancel-btn {
        min-width: auto;
        width: 100%;
    }
}

/* УЛУЧШЕНИЯ ДЛЯ ТЕЛЕФОНОВ (480px и меньше) */
@media (max-width: 480px) {
    .auth-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    .auth-container h1 {
        font-size: 1.8rem;
    }
    .theatre-card,
    .premiere-card {
        padding: 1.5rem;
    }
    .theatre-image,
    .premiere-image {
        height: 200px;
    }

    /* КЛЮЧЕВЫЕ ИЗМЕНЕНИЯ ДЛЯ ВЫБОРА МЕСТ НА ТЕЛЕФОНЕ */
    .seats-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
        max-width: 100%;
    }
    .seat {
        width: auto;
        height: 52px;
        font-size: 1rem;
        font-weight: 700;
        border-radius: 10px;
    }
    .seats-legend {
        gap: 20px;
        padding: 15px;
    }
    .legend-item span {
        font-size: 0.9rem;
    }
    .seat-legend {
        width: 28px;
        height: 28px;
    }
    .booking-summary {
        padding: 20px;
    }
    .booking-summary h3 {
        font-size: 1.1rem;
    }
    .summary-item {
        font-size: 0.95rem;
    }
    .summary-item.total {
        font-size: 1rem;
    }
    .confirm-btn, .cancel-btn {
        padding: 14px;
        font-size: 1rem;
    }
    .seats-grid-afisha {
        grid-template-columns: repeat(6, 1fr);
        gap: 10px;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
    .summary-items-afisha {
        grid-template-columns: 1fr;
    }
    .seats-legend-afisha {
        gap: 15px;
    }
    .modal-header {
        padding: 15px;
    }
    .performance-header-info h2 {
        font-size: 1.2rem;
    }
    .performance-image-small {
        width: 60px;
        height: 60px;
    }
    .stage-label {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    /* Исправление надписи в личном кабинете */
    .no-bookings {
        font-size: 1rem;
        padding: 2rem 1rem;
    }
    .no-bookings p {
        font-size: 1rem;
    }
    .booking-history h2 {
        font-size: 1.5rem;
    }
    .profile-header h1 {
        font-size: 1.8rem;
    }
    .profile-info h2 {
        font-size: 1.5rem;
    }
    .user-details .detail-item,
    .booking-details .detail-item {
        padding: 0.8rem;
    }
    .user-details strong,
    .booking-details strong {
        font-size: 0.8rem;
        letter-spacing: 0.8px;
    }
    .user-details span,
    .booking-details span {
        font-size: 0.9rem;
    }
}

/* ДЛЯ ОЧЕНЬ УЗКИХ ТЕЛЕФОНОВ (до 380px) */
@media (max-width: 380px) {
    .seats-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }
    .seat {
        height: 48px;
        font-size: 0.9rem;
    }
    .seats-grid-afisha {
        grid-template-columns: repeat(5, 1fr);
    }
    .booking-actions {
        gap: 10px;
    }
}

/* ========== ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ ========== */

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* ========== АНИМАЦИИ ========== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theatre-card,
.premiere-card,
.link-card,
.performance-card {
    animation: fadeIn 0.6s ease-out;
}