/* Video Tutorial Creator - Sumur Digital Styled */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #2c3e50;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Header */
.main-header {
    background: #101010;
    color: white;
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-left, .logo-right {
    display: flex;
    align-items: center;
}

.company-logo {
    height: 50px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
}

/* Viewer Header */
.viewer-header {
    background: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    padding: 25px 0;
    margin-bottom: 20px;
    border-radius: 0 0 20px 20px;
}

.viewer-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.presupuesto-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 30px;
    border-radius: 15px;
    border-left: 5px solid #0066cc;
    display: inline-block;
}

.presupuesto-single-line {
    font-size: 1.1em;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 600;
}

/* Viewer Container */
.viewer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Video Section */
.video-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid #e9ecef;
    margin-bottom: 30px;
}

.video-header {
    background: #229DD9;
    color: white;
    padding: 20px 30px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.video-header h3 {
    font-size: 1.7em;
    margin: 0;
    font-weight: 600;
}

.video-duration-bubble {
    background: #E93F79;
    border: 2px solid #fff;
    border-radius: 25px;
    padding: 8px 26px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: float 3s ease-in-out infinite;
    position: relative;
}

.video-duration-bubble::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    border-radius: 25px;
    z-index: -1;
}

.duration-icon {
    font-size: 1.1em;
    animation: tick 2s ease-in-out infinite;
}

.duration-text {
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes tick {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}

#videoPlayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-controls-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.speed-control-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.speed-control-btn:hover {
    background: rgba(0, 102, 204, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
}

.speed-control-btn.active {
    background: rgba(0, 102, 204, 0.9);
    border-color: #0066cc;
}

/* Signature Notice - Updated with blue theme */
.signature-notice {
    background: #229DD9;
    padding: 20px 30px;
    margin: 30px 0;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    position: relative;
    overflow: hidden;
	font-size: 1.2em;
}

.signature-notice::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        transform: translate(-30%, -30%);
    }
    50% {
        transform: translate(-20%, -20%);
    }
}

.notice-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
}

.notice-content h3 {
    font-size: 1.3em;
    font-weight: 600;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* Alerts */
.alert {
    padding: 20px 25px;
    margin-bottom: 25px;
    border-radius: 12px;
    font-weight: 500;
    border: none;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-success::before {
    background: #28a745;
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-error::before {
    background: #dc3545;
}

/* Form groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #495057;
    font-size: 1.05em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="file"],
.form-textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    font-family: inherit;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-textarea:focus {
    outline: none;
    border-color: #229DD9;
    background: white;
    box-shadow: 0 0 0 3px rgba(34, 157, 217, 0.1);
    transform: translateY(-2px);
}

/* Form row for side-by-side inputs */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Required field indicator */
.required {
    color: #e74c3c;
    font-size: 1.2em;
}

/* Video recording section */
#video_record_section {
    margin-top: 25px;
    text-align: center;
    position: relative;
}

#preview, #recorded {
    border: 3px solid #229DD9;
    border-radius: 12px;
    margin: 15px auto;
    display: block;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

/* Recording status indicator */
.recording-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #229DD9 0%, #0066cc 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(34, 157, 217, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(34, 157, 217, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(149, 165, 166, 0.6);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(231, 76, 60, 0.6);
}

.btn-large {
    padding: 20px 40px;
    font-size: 18px;
    display: block;
    width: 100%;
    margin-top: 25px;
    font-weight: 700;
}

/* Progress bar */
#uploadProgress {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background-color: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #229DD9 0%, #0066cc 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 30px 30px;
    animation: progress-animation 1s linear infinite;
}

@keyframes progress-animation {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 30px 30px;
    }
}

.progress-text {
    text-align: center;
    margin-top: 15px;
    font-weight: 600;
    color: #495057;
    font-size: 1.1em;
}

#uploadInfo {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

#uploadInfo span {
    white-space: nowrap;
    padding: 5px 15px;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 0.9em;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

/* Footer */
.footer {
    background: #101010;
    color: white;
    padding: 40px 0;
    margin-top: 50px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-cta-text {
    margin-bottom: 25px;
}

.footer-cta-text h3 {
    font-size: 1.4em;
    font-weight: 600;
    color: white;
    margin: 0;
    position: relative;
    display: inline-block;
    padding-bottom: 30px;
}

.footer-cta-text h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #0066cc;
    border-radius: 2px;
    animation: underlineGlow 2s ease-in-out infinite;
}

@keyframes underlineGlow {
    0%, 100% {
        opacity: 0.8;
        width: 80px;
    }
    50% {
        opacity: 1;
        width: 100px;
    }
}

.footer-cta-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.footer-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

/* Phone Icon - Blue */
.footer-icon[title="Llamar"] {
    background: linear-gradient(135deg, #0066cc 0%, #004c99 100%);
    box-shadow: 0 5px 20px rgba(0, 102, 204, 0.4);
}

.footer-icon[title="Llamar"]:hover {
    transform: translateY(-5px) scale(1.1) rotate(5deg);
    box-shadow: 0 15px 35px rgba(0, 102, 204, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

/* WhatsApp Icon - Green */
.footer-icon[title="WhatsApp"] {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
}

.footer-icon[title="WhatsApp"]:hover {
    transform: translateY(-5px) scale(1.1) rotate(-5deg);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Email Icon - Gmail Red */
.footer-icon[title="Email"] {
    background: linear-gradient(135deg, #ea4335 0%, #c23321 100%);
    box-shadow: 0 5px 20px rgba(234, 67, 53, 0.4);
}

.footer-icon[title="Email"]:hover {
    transform: translateY(-5px) scale(1.1) rotate(5deg);
    box-shadow: 0 15px 35px rgba(234, 67, 53, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Icon hover animations */
.footer-icon:hover::before {
    width: 120%;
    height: 120%;
}

.footer-icon:hover svg {
    animation: iconShake 0.5s ease-in-out;
}

@keyframes iconShake {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

.footer-icon svg {
    width: 28px;
    height: 28px;
    z-index: 1;
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.powered-by {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9em;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .viewer-container {
        padding: 0 10px;
    }
    
    .header-content {
        justify-content: center;
        gap: 20px;
    }
    
    .company-logo {
        height: 40px;
        max-width: 200px;
    }
    
    .presupuesto-info {
        width: 100%;
        padding: 15px 20px;
    }
    
    .presupuesto-single-line {
        font-size: 0.95em;
    }
    
    .video-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .video-duration-bubble {
        align-self: center;
    }
    
    .video-container {
        padding-bottom: 75%; /* Adjust aspect ratio for mobile */
    }
    
    .speed-control-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .signature-notice {
        padding: 15px 20px;
        margin: 20px 0;
    }
    
    .notice-content h3 {
        font-size: 1.1em;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .footer-cta-text h3 {
        font-size: 1.2em;
        padding: 0 10px;
    }
    
    .footer-cta-icons {
        gap: 20px;
    }
    
    .footer-icon {
        width: 50px;
        height: 50px;
    }
    
    .footer-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .footer-icon[title="Llamar"]:hover,
    .footer-icon[title="WhatsApp"]:hover,
    .footer-icon[title="Email"]:hover {
        transform: translateY(-3px) scale(1.05);
    }
}

@media (max-width: 480px) {
    .presupuesto-single-line {
        font-size: 0.85em;
    }
    
    .status-badge {
        padding: 3px 8px;
        font-size: 0.8em;
    }
    
    .footer-cta-text h3 {
        font-size: 1.1em;
    }
}