/* style.css */

/* --- ESTILOS GENERALES Y LAYOUT --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f0f0f0;
    margin: 0;
}

.container {
    display: flex;
  
  
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding-top: 20px; 
    padding-bottom: 20px; 
}

.status-message {
    font-size: 1.1em;
    color: #7f8c8d;
    margin-bottom: 20px;
    text-align: center;
    min-height: 1.2em;
}

/* --- ESTILOS DEL VELOCÍMETRO --- */
.circular-progress {
    position: relative;
    height: 350px;
    width: 350px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 5px 5px 10px #bebebe, -5px -5px 10px #ffffff;
    --progress: 0%;
}

.inner-circle {
    position: absolute;
    height: 310px;
    width: 310px;
    border-radius: 50%;
    background-color: #2c3e50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 2px 2px 5px #1e2b38, inset -2px -2px 5px #3a5168;
    z-index: 2;
}

.circular-progress::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    border-radius: 50%;
    background: conic-gradient(
        #2ecc71 0% var(--progress),
        #e0e0e0 var(--progress) 100%
    );
    transition: background 0.8s ease-out;
    -webkit-mask: radial-gradient(circle, transparent 40%, black 40%);
    mask: radial-gradient(circle, transparent 40%, black 40%);
    z-index: 1;
}

.value-container {
    font-size: 7.2em;
    color: #fff;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 3;
}

.label-container {
    color: #fff;
    font-size: 1.5em;
    opacity: 0.8;
    position: relative;
    z-index: 3;
}

/* --- ESTILOS DE LOS CONTROLES Y BOTONES --- */
.controles {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
}

.controles label {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #555;
}

.controles input[type="number"] {
    padding: 12px;
    margin-bottom: 15px;
    width: 200px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
}

.controles button {
    padding: 15px 30px;
    cursor: pointer;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    margin-bottom: 10px;
}

.controles button:hover {
    background-color: #2980b9;
}

.controles .detail-button {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #ffffff;
    color: #7f8c8d;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.controles .detail-button:hover {
    background-color: #f8f9f9;
    border-color: #95a5a6;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* --- ESTILOS DEL BOTÓN DE REINTENTO --- */
.controles .retry-icon-button {
    background-color: #e74c3c;
    border: 2px solid #e74c3c;
    color: #ffffff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.8em;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
}

.controles .retry-icon-button i {
    line-height: 1;
    transform: translateX(-14px);
}

.controles .retry-icon-button:hover {
    background-color: #c0392b;
    border-color: #c0392b;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* --- ESTILOS DEL MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s ease;
}

.modal-overlay.visible {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background-color: #2c3e50;
    color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease-out;
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.8em;
    text-align: center;
    color: #2ecc71;
}

.modal-content p {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.modal-content strong {
    color: #3498db;
}

.modal-content hr {
    border: 0;
    height: 1px;
    background: #555;
    margin: 20px 0;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2em;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: #e74c3c;
}

/* --- ESTILOS DEL FOOTER --- */
.footer {
    width: 100%;
    background-color: #f0f0f0;
    padding: 20px;
    box-sizing: border-box;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.footer-logo-copyright {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.footer-logo-copyright img {
    margin-top: 2px !important;
}

/* --- MEDIA QUERIES --- */
@media (max-width: 768px) {
    .youtube-fixed-button {
        bottom: 15px;
        right: 15px;
        padding: 8px 12px;
        font-size: 0.9em;
    }
    .footer {
        padding: 15px;
    }
}

/* --- ESTILOS ADICIONALES --- */
.top-right-link {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 999;
}

.top-right-link a {
    color: #555;
    text-decoration: none;
    font-size: 0.8em;
    font-weight: 500;
    transition: color 0.3s ease;
}

.top-right-link a:hover {
    color: #aaa;
}

.copyright-text {
    font-size: 0.8em;
}

