/* Color de fondo inspirado en CIE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #8B3A42 0%, #A73B47 50%, #8B3A42 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.titulo {
    text-align: center;
    color: #8B3A42;
    font-size: 2.5rem;
    margin-bottom: 30px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.camera-section {
    margin-bottom: 40px;
}

.preview-container {
    width: 90%;
    max-width: 400px;
    margin: 0 auto 20px;
    border: 4px solid #8B3A42;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* En móviles, hacer aún más pequeño */
@media (max-width: 768px) {
    .preview-container {
        width: 85%;
        max-width: 350px;
        min-height: 220px;
    }
}

#video {
    width: 100%;
    height: auto;
    display: block;
}

#photo {
    width: 100%;
    height: auto;
    display: none;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

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

.btn-primary {
    background: #8B3A42;
    color: white;
}

.btn-primary:hover {
    background: #A73B47;
}

.btn-secondary {
    background: #4CAF50;
    color: white;
}

.btn-secondary:hover {
    background: #45a049;
}

.btn-success {
    background: #2196F3;
    color: white;
}

.btn-success:hover {
    background: #0b7dda;
}

.btn-tertiary {
    background: #FF9800;
    color: white;
}

.btn-tertiary:hover {
    background: #FB8C00;
}

.location-section {
    background: linear-gradient(135deg, #8B3A42 0%, #A73B47 100%);
    padding: 30px;
    border-radius: 15px;
    color: white;
    display: none; /* Oculto visualmente pero existe en el código */
}

.location-section h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.location-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.loading {
    text-align: center;
    font-size: 1.2rem;
    padding: 20px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.location-data {
    display: grid;
    gap: 15px;
}

.coord-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1.1rem;
}

.label {
    font-weight: bold;
    margin-right: 10px;
}

.value {
    font-family: 'Courier New', monospace;
    color: #FFD700;
}

.error {
    text-align: center;
    color: #ffcccc;
    padding: 20px;
    font-size: 1.1rem;
}

/* Mapa de Nuevo León */
.map-section {
    margin-bottom: 30px;
}

.map-section h2 {
    text-align: center;
    color: #8B3A42;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.map-container {
    width: 100%;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 15px;
}

.location-status {
    text-align: center;
    padding: 12px;
    background: rgba(139, 58, 66, 0.1);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
}

.location-status.dentro {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.location-status.fuera {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

#statusIcon {
    font-size: 1.2rem;
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .titulo {
        font-size: 1.8rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 1rem;
    }

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

    .map-container {
        height: 250px;
    }
}

