/**
 * Archivo CSS principal del sistema
 * 
 * Descripción:
 * - Este archivo contiene diseño básico para el apartado del front.
 * - Si tienes conocimientos en CSS puedes tomarte el tiempo de modificarlo.
 * 
 * Creado Por: RobGe - 23/01/2025. Version 1.0
 */
 html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    display: flex;
    flex-direction: column;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background: linear-gradient(180deg, rgba(51, 51, 51, 0.85) 0%, rgba(34, 34, 34, 0.85) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    font-weight: bold;
    color: #4CAF50;
    font-size: 1.5rem;
    transition: transform 0.3s;
}

nav .logo:hover {
    transform: scale(1.1);
}

nav .menu {
    display: flex;
    gap: 20px;
}

nav .menu a {
    text-decoration: none;
    color: #ccc;
    font-size: 1rem;
    white-space: nowrap;
    transition: color 0.3s;
}

nav .menu a:hover, nav .menu a:focus {
    color: #ffffff;
    background-color: #444;
}

nav .hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

nav .hamburger div {
    width: 25px;
    height: 3px;
    background-color: #ccc;
}

header {
    padding-top: 120px;
    padding-bottom: 120px;
    background-image: url('https://www.onebyfourstudio.com/wp-content/uploads/2020/10/Depositphotos_355214600_s-2019.jpg');
    background-size: cover;
    color: white;
    text-align: center;
    margin: 0;
}

header h1 {
    font-size: 3rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

header p {
    font-size: 1.5rem;
    margin-top: 10px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.form {
    background-color: #222;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    width: 100%;
    margin-bottom: 20px;
}

.form input[type="email"] {
    flex: 1;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #555;
    outline: none;
    color: #ddd;
    background-color: #333;
}

.form button {
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s ease-in-out;
}

.form button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

.loading-message {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150px;
}

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4CAF50;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow: hidden;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

#pin-input {
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.modal-buttons button {
    padding: 10px 15px;
    font-size: 14px;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal-buttons button:first-child {
    background: #28a745;
}

.modal-buttons button:last-child {
    background: #dc3545;
}

.modal-buttons button:hover {
    opacity: 0.9;
}

.email-preview {
    margin-top: 20px;
    width: 100%;
    text-align: center;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #333;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    height: 60px;
    line-height: 60px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
    font-size: 1rem;
}

footer a {
    color: #2575fc;
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    text-decoration: underline;
    color: #1a5ecb;
}

@media (max-width: 768px) {
    nav .menu {
        display: none;
        flex-direction: column;
        gap: 10px;
        position:absolute;
        top: 60px;
        right: 20px;
        background-color: #333;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 10px;
        border-radius: 5px;
    }

    nav .menu.active {
        display:flex;
    }

    nav .hamburger {
        display: flex;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    .form input[type="email"], .form button {
        font-size: 0.9rem;
    }
}