* {
    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;
    color: #333;
}

/* Location Block Screen */
.location-block-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 2000;
}

.location-block-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.4s ease;
}

.location-block-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.location-block-content h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 15px;
}

.location-block-content p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.location-block-details {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 30px;
}

.location-block-hint {
    font-size: 0.85rem;
    color: #999;
    margin-top: 20px;
    font-style: italic;
}

.location-request-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
}

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

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

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease-out;
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

header h1 {
    font-size: 2.5rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.language-selector {
    padding: 8px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.language-selector:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.language-selector:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.language-selector option {
    background: #667eea;
    color: white;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

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

.door {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.door::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;
}

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

.door:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.door-number {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.door-label {
    font-size: 1rem;
    color: #666;
    margin-bottom: 15px;
}

.queue-count {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 10px;
}

.queue-count.zero {
    background: #ccc;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 40px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.4s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.modal-header h2 {
    font-size: 1.5rem;
}

.close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.location-status-container {
    padding: 12px 25px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    flex-shrink: 0;
}

.location-status {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 500;
    transition: all 0.3s ease;
}

.location-status.allowed {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.location-status.denied {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.location-status.error {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.info-message-container {
    padding: 15px 25px;
    background: #fff3cd;
    border-bottom: 2px solid #ffc107;
    flex-shrink: 0;
}

.info-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #fffbf0;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.info-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #856404;
}

.info-text strong {
    color: #856404;
    font-weight: 600;
}

.add-person-section {
    padding: 18px 25px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
    background: #fafafa;
}

.name-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

.add-btn {
    padding: 12px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

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

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

.add-btn.disabled,
.name-input.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #e9ecef;
    color: #6c757d;
}

.add-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

.complete-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #6c757d !important;
}

.complete-btn.disabled:hover {
    transform: none;
    background: #6c757d !important;
}

.queue-list-container {
    padding: 15px 25px 25px 25px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    max-height: calc(100vh - 350px);
    -webkit-overflow-scrolling: touch;
}

.queue-list-container::-webkit-scrollbar {
    width: 8px;
}

.queue-list-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.queue-list-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.queue-list-container::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

.queue-list-container h3 {
    margin-bottom: 12px;
    color: #333;
    font-size: 1.1rem;
}

.queue-list {
    list-style: none;
}

.queue-item {
    background: #f8f9fa;
    padding: 8px 15px;
    margin-bottom: 6px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
    border-left: 4px solid #667eea;
}

.queue-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.queue-item.completed {
    opacity: 0.6;
    background: #e9ecef;
    border-left-color: #28a745;
}

.queue-item.completed .person-name {
    text-decoration: line-through;
    color: #6c757d;
}

.queue-number {
    font-weight: bold;
    color: #667eea;
    margin-right: 12px;
    min-width: 25px;
    font-size: 0.95rem;
}

.person-name {
    flex: 1;
    font-size: 0.95rem;
    color: #333;
    transition: all 0.3s ease;
}

.complete-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    font-weight: bold;
}

.complete-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

.complete-btn:active {
    transform: scale(0.95);
}

.queue-item.completed .complete-btn {
    background: #dc3545;
}

.queue-item.completed .complete-btn:hover {
    background: #c82333;
}

.empty-message {
    text-align: center;
    color: #999;
    font-size: 1.1rem;
    padding: 40px;
    display: none;
}

.empty-message.show {
    display: block;
}

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

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

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes strikeThrough {
    0% {
        transform: scaleX(0);
    }
    100% {
        transform: scaleX(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .header-top {
        flex-direction: column;
        gap: 15px;
    }
    
    .language-selector {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

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

    .door {
        padding: 20px;
    }

    .door-number {
        font-size: 2.5rem;
    }

    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }

    .queue-list-container {
        max-height: calc(100vh - 320px);
    }

    .add-person-section {
        flex-direction: column;
    }

    .name-input {
        width: 100%;
    }

    .add-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .doors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .door-number {
        font-size: 2rem;
    }
}

