* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    color: #667eea;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    margin: 20px 0 15px 0;
    color: #333;
    font-size: 1.3rem;
    border-bottom: 2px solid #667eea;
    display: inline-block;
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    min-width: 150px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.ticket-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.ticket-item h3 {
    margin-bottom: 10px;
    color: #667eea;
}

.btn-add, .btn-submit, .btn-remove {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
}

.btn-add {
    background: #4caf50;
    color: white;
    margin-right: 10px;
}

.btn-remove {
    background: #f44336;
    color: white;
    font-size: 0.8rem;
    margin-top: 10px;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    margin-top: 20px;
}

.btn-submit:hover {
    transform: translateY(-2px);
}

/* Admin panel */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-header {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logout-btn {
    background: #f44336;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
}

.reservation-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.reservation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 15px;
}

.btn-delete {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.tickets-table th, .tickets-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.tickets-table th {
    background: #f8f9fa;
}

.token {
    font-family: monospace;
    font-size: 0.8rem;
}

.btn-view {
    background: #2196f3;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
}

.empty {
    background: white;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    color: #999;
}

/* Login */
.login-container {
    max-width: 400px;
    margin: 100px auto;
}

.login-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    text-align: center;
}

.login-card h1 {
    margin-bottom: 10px;
}

/* Ticket view */
.ticket-container {
    max-width: 500px;
    margin: 0 auto;
}

.ticket-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
}

.ticket-header h1 {
    color: #667eea;
}

.ticket-body {
    margin: 20px 0;
    text-align: left;
}

.ticket-info div {
    margin: 8px 0;
}

.ticket-qr img {
    max-width: 150px;
    margin: 20px auto;
    display: block;
}

.print-btn {
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

@media print {
    .print-btn, .logout-btn, .btn-delete, .btn-view {
        display: none;
    }
    body {
        background: white;
        padding: 0;
    }
}

@media (max-width: 600px) {
    .container, .admin-container {
        padding: 15px;
    }
    .reservation-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.admin-link {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.8rem;
    margin-top: 10px;
}

.admin-link:hover {
    background: #e0e0e0;
}

.back-link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    margin-bottom: 20px;
}

.back-link:hover {
    text-decoration: underline;
}

.btn-delete-ticket {
    background: #ff9800;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.7rem;
    margin-left: 5px;
}

.btn-delete-ticket:hover {
    background: #f57c00;
}

.cancelled-ticket {
    background: #ffebee;
    opacity: 0.7;
}

/* Footer */
.footer {
    margin-top: 40px;
    text-align: center;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.footer-content {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
}

.footer-content p {
    margin: 5px 0;
}

.footer-content strong {
    color: white;
}

/* Popup sukcesu */
.success-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.success-content {
    background: white;
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    animation: slideIn 0.3s ease;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.success-content h2 {
    color: #4caf50;
    margin-bottom: 15px;
}

.success-content p {
    color: #666;
    margin-bottom: 10px;
}

.success-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-success {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s;
}

.btn-success:hover {
    transform: translateY(-2px);
}

.btn-close-popup {
    background: #f0f0f0;
    color: #666;
    border: none;
    padding: 10px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.btn-close-popup:hover {
    background: #e0e0e0;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.admin-link {
    display: inline-block;
    background: rgba(102,126,234,0.1);
    color: #667eea;
    padding: 8px 16px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.85rem;
    margin-top: 15px;
    transition: all 0.2s;
}

.admin-link:hover {
    background: rgba(102,126,234,0.2);
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .success-content {
        padding: 20px;
    }
    .success-buttons {
        flex-direction: column;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    color: #667eea;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    margin: 20px 0 15px 0;
    color: #333;
    font-size: 1.3rem;
    border-bottom: 2px solid #667eea;
    display: inline-block;
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    min-width: 150px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.ticket-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.ticket-item h3 {
    margin-bottom: 10px;
    color: #667eea;
}

.btn-add, .btn-submit, .btn-remove {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
}

.btn-add {
    background: #4caf50;
    color: white;
    margin-right: 10px;
}

.btn-remove {
    background: #f44336;
    color: white;
    font-size: 0.8rem;
    margin-top: 10px;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    margin-top: 20px;
}

.btn-submit:hover {
    transform: translateY(-2px);
}

/* Statystyki miejsc */
.seats-info {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.seats-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 15px;
}

.stat-box {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
}

.progress-bar {
    background: #e0e0e0;
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

/* Footer */
.footer {
    margin-top: 40px;
    text-align: center;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.footer-content {
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem;
}

.footer-content p {
    margin: 5px 0;
}

.footer-content strong {
    color: white;
}

/* Popup sukcesu */
.success-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.success-content {
    background: white;
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    animation: slideIn 0.3s ease;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.success-content h2 {
    color: #4caf50;
    margin-bottom: 15px;
}

.success-content p {
    color: #666;
    margin-bottom: 10px;
}

.success-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-success {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s;
}

.btn-success:hover {
    transform: translateY(-2px);
}

.btn-close-popup {
    background: #f0f0f0;
    color: #666;
    border: none;
    padding: 10px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.btn-close-popup:hover {
    background: #e0e0e0;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.admin-link {
    display: inline-block;
    background: rgba(102,126,234,0.1);
    color: #667eea;
    padding: 8px 16px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.85rem;
    margin-top: 15px;
    transition: all 0.2s;
}

.admin-link:hover {
    background: rgba(102,126,234,0.2);
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    .success-content {
        padding: 20px;
    }
    .success-buttons {
        flex-direction: column;
    }
    .seats-stats {
        gap: 20px;
    }
    .stat-number {
        font-size: 1.5rem;
    }
}