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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.screen {
    display: none;
    min-height: 100vh;
    position: relative;
}

.screen.active {
    display: flex;
}

#welcome-screen {
    background: linear-gradient(135deg, #e0f2fe 0%, #c5cae9 100%);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#location-screen {
    background: linear-gradient(135deg, #e8f5e8 0%, #e0f2fe 100%);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#map-screen {
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header {
    margin-bottom: 2rem;
}

.icon-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2196f3 0%, #3f51b5 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
}

.icon-circle.green {
    background: linear-gradient(135deg, #4caf50 0%, #2196f3 100%);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.icon-circle i {
    font-size: 2.5rem;
    color: white;
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 1.5rem;
}

.language-section {
    margin-bottom: 2rem;
}

.language-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.lang-btn {
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.lang-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #bbb;
}

.lang-btn.active {
    border-color: #2196f3;
    background: #f3f9ff;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.2);
}

.flag {
    font-size: 1.5rem;
}

.name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
}

.primary-btn {
    background: linear-gradient(135deg, #2196f3 0%, #3f51b5 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(33, 150, 243, 0.4);
}

.primary-btn.green {
    background: linear-gradient(135deg, #4caf50 0%, #2196f3 100%);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.primary-btn.green:hover {
    box-shadow: 0 12px 30px rgba(76, 175, 80, 0.4);
}

.chrome-warning {
    background: #fff3e0;
    border: 1px solid #ffcc02;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chrome-warning i {
    font-size: 2rem;
    color: #ff9800;
}

.chrome-warning p {
    font-size: 0.9rem;
    color: #e65100;
    font-weight: 500;
    text-align: left;
}

.location-request {
    margin-bottom: 2rem;
}

.warning-icon {
    font-size: 3rem;
    color: #ffc107;
    margin-bottom: 1rem;
}

.location-request p {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 500;
}

.map-header {
    background: white;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.map-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

.accuracy-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
}

.accuracy-display i {
    color: #28a745;
}

.map-container {
    flex: 1;
    min-height: calc(100vh - 80px);
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Responsive */
@media (max-width: 480px) {
    .card {
        padding: 1.5rem;
    }
    
    .language-grid {
        grid-template-columns: 1fr;
    }
    
    .map-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .accuracy-display {
        justify-content: center;
    }
}

/* RTL Support per àrab */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .chrome-warning {
    flex-direction: row-reverse;
}

[dir="rtl"] .accuracy-display {
    flex-direction: row-reverse;
}
