/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 1rem;
    color: #333;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main content */
main {
    padding: 2rem;
}

.card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.card h2 {
    color: #495057;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Input groups */
.input-group,
.info-group,
.result-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="datetime-local"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

input[type="datetime-local"]:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
    transform: translateY(-1px);
}

/* Current time display */
.current-time {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

/* Desfasaje display */
.desfasaje {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
}

.status {
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status.adelantado {
    background: #ff6b6b;
    color: white;
}

.status.atrasado {
    background: #4ecdc4;
    color: white;
}

.status.sincronizado {
    background: #45b7d1;
    color: white;
}

.time {
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
}

/* DVR search time */
.dvr-search-time {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #8b4513;
    padding: 1.5rem;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 15px rgba(252, 182, 159, 0.3);
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Divider */
.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
    margin: 2rem 0;
}

/* Instructions */
.instructions {
    background: #e3f2fd;
    border-radius: 15px;
    padding: 1.5rem;
    border-left: 4px solid #2196f3;
}

.instructions h3 {
    color: #1976d2;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instructions ol {
    padding-left: 1.5rem;
    color: #424242;
    line-height: 1.6;
}

.instructions li {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid #34495e;
}

.footer-content {
    max-width: 400px;
    margin: 0 auto;
}

.footer-content p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.footer-content strong {
    color: #3498db;
    font-weight: 700;
}

.footer-content .year {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 0.8rem;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
    }
    
    .container {
        border-radius: 15px;
    }
    
    header {
        padding: 1.5rem 1rem;
    }
    
    header h1 {
        font-size: 1.7rem;
    }
    
    main {
        padding: 1.5rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .desfasaje {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Loading animation */
.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Success animation */
.success {
    animation: bounceIn 0.5s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
