body {
    background: linear-gradient(135deg, #6d8b23 0%, #8fbc23 100%);
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.birthday-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 2rem;
    margin: 2rem 0;
    border: 2px solid rgba(109, 139, 35, 0.2);
}

.birthday-header {
    text-align: center;
    margin-bottom: 2rem;
}

.birthday-title {
    color: #6d8b23;
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.birthday-name {
    color: #8fbc23;
    font-size: 2.5rem;
    font-weight: bold;
    margin: 1rem 0;
}

.birthday-date {
    color: #555;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.wish-card {
    background: linear-gradient(45deg, #6d8b23 0%, #8fbc23 100%);
    color: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 5px 15px rgba(109, 139, 35, 0.3);
}

.wish-form {
    background: rgba(109, 139, 35, 0.1);
    border: 2px solid rgba(109, 139, 35, 0.2);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
}

.form-control {
    border-radius: 10px;
    border: 2px solid rgba(109, 139, 35, 0.3);
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #6d8b23;
    box-shadow: 0 0 0 0.2rem rgba(109, 139, 35, 0.25);
}

.btn-birthday {
    background: linear-gradient(45deg, #6d8b23 0%, #8fbc23 100%);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-birthday:hover {
    background: linear-gradient(45deg, #5a7020 0%, #7ba020 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(109, 139, 35, 0.4);
    color: white;
}

.admin-links {
    position: absolute;
    top: 20px;
    right: 20px;
}

.admin-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    margin-left: 15px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-links a:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    transform: translateY(-1px);
}

.admin-links .login-link {
    background: rgba(109, 139, 35, 0.9) !important;
    border: 2px solid rgba(109, 139, 35, 1) !important;
    color: white !important;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(109, 139, 35, 0.3);
}

.admin-links .login-link:hover {
    background: rgba(109, 139, 35, 1) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(109, 139, 35, 0.5);
}

.admin-links .logout-form {
    display: inline;
}

.admin-links .logout-btn {
    background: rgba(220, 53, 69, 0.8);
    border: none;
    color: white;
    padding: 8px 15px;
    margin-left: 15px;
    border-radius: 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-links .logout-btn:hover {
    background: rgba(220, 53, 69, 1);
}

.no-birthday {
    text-align: center;
    color: #6d8b23;
    font-size: 1.5rem;
    margin: 3rem 0;
}

.event-info {
    background: rgba(109, 139, 35, 0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(109, 139, 35, 0.2);
}

.form-label {
    color: #6d8b23;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.alert-info {
    background-color: rgba(109, 139, 35, 0.1);
    border-color: rgba(109, 139, 35, 0.2);
    color: #5a7020;
}

.text-muted {
    color: #7ba020 !important;
}

/* Loading spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Modal customization */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(45deg, #6d8b23 0%, #8fbc23 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* Error states */
.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #721c24;
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
}

/* Connection status indicator */
.connection-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 1000;
}

.connection-status.online {
    background: rgba(25, 135, 84, 0.9);
    color: white;
}

.connection-status.offline {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .birthday-title {
        font-size: 2rem;
    }
    
    .birthday-name {
        font-size: 1.8rem;
    }
    
    .admin-links {
        position: relative;
        top: auto;
        right: auto;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .admin-links a {
        margin: 5px;
        display: inline-block;
    }
}

/* Forzar que el loading se oculte cuando display = none */
#loading[style*="display: none"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    z-index: -1 !important;
    pointer-events: none !important;
}

/* Backup con clase */
#loading.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    z-index: -1 !important;
    pointer-events: none !important;
}

/* ===== MULTIMEDIA STYLES ===== */

/* Enhanced wish form for multimedia */
.wish-form-multimedia {
    background: rgba(109, 139, 35, 0.1);
    border: 2px solid rgba(109, 139, 35, 0.2);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
}

/* Message type selector */
.message-type-selector {
    border-bottom: 1px solid rgba(109, 139, 35, 0.2);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.message-type-btn {
    border-color: rgba(109, 139, 35, 0.3) !important;
    color: #6d8b23 !important;
    transition: all 0.3s ease;
}

.message-type-btn:hover {
    border-color: #6d8b23 !important;
    background-color: rgba(109, 139, 35, 0.1) !important;
    color: #6d8b23 !important;
}

.message-type-btn.active {
    background: linear-gradient(45deg, #6d8b23 0%, #8fbc23 100%) !important;
    border-color: #6d8b23 !important;
    color: white !important;
}

/* Recording controls */
.recording-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recording-status {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    color: #721c24;
}

.recording-indicator {
    width: 12px;
    height: 12px;
    background-color: #dc3545;
    border-radius: 50%;
    animation: recordingPulse 1s infinite;
    margin-right: 0.5rem;
}

@keyframes recordingPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.2); }
}

/* Video recording styles */
.video-container {
    background: #f8f9fa;
    border: 2px dashed rgba(109, 139, 35, 0.3);
    border-radius: 15px;
    padding: 1rem;
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-placeholder {
    color: #6c757d;
    text-align: center;
}

.video-placeholder i {
    color: rgba(109, 139, 35, 0.7);
    margin-bottom: 1rem;
}

#videoPreview {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Audio/Video preview sections */
#audioPreview, #videoPreview {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(109, 139, 35, 0.2);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

#audioPreview audio {
    border-radius: 8px;
}

/* File upload sections */
.file-upload-option {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(109, 139, 35, 0.2);
    border-radius: 10px;
    padding: 1rem;
}

/* Upload progress */
.upload-progress {
    background: rgba(109, 139, 35, 0.1);
    border: 1px solid rgba(109, 139, 35, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.upload-progress .progress {
    height: 8px;
    border-radius: 4px;
    background-color: rgba(109, 139, 35, 0.2);
}

.upload-progress .progress-bar {
    background: linear-gradient(45deg, #6d8b23 0%, #8fbc23 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Enhanced wish cards for different message types */
.wish-card {
    background: linear-gradient(45deg, #6d8b23 0%, #8fbc23 100%);
    color: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 5px 15px rgba(109, 139, 35, 0.3);
    transition: all 0.3s ease;
}

.wish-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(109, 139, 35, 0.4);
}

.wish-card-audio {
    background: linear-gradient(45deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.wish-card-audio:hover {
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.wish-card-video {
    background: linear-gradient(45deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.wish-card-video:hover {
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

/* Message type badges */
.message-type-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Media message content */
.media-message {
    background: transparent;
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

.media-message audio,
.media-message video {
    background: #000;
    border-radius: 6px;
}

.media-message video {
    object-fit: contain;
    background: #000;
}

.media-message video:hover {
    filter: none;
    background: #000;
}

/* Recording timer styles */
.recording-status span {
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Enhanced file inputs */
input[type="file"] {
    border: 2px dashed rgba(109, 139, 35, 0.3);
    border-radius: 8px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

input[type="file"]:hover {
    border-color: #6d8b23;
    background: rgba(109, 139, 35, 0.05);
}

input[type="file"]:focus {
    outline: none;
    border-color: #6d8b23;
    box-shadow: 0 0 0 0.2rem rgba(109, 139, 35, 0.25);
}

/* Audio section specific */
.audio-recording-section {
    background: rgba(52, 152, 219, 0.05);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
}

/* Video section specific */
.video-recording-section {
    background: rgba(231, 76, 60, 0.05);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wish-form-multimedia {
        padding: 1.5rem;
    }
    
    .message-type-selector .btn-group {
        flex-direction: column;
    }
    
    .message-type-btn {
        border-radius: 8px !important;
        margin-bottom: 0.5rem;
    }
    
    .recording-controls {
        text-align: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .video-container {
        min-height: 200px;
    }
    
    .media-message video {
        max-height: 200px;
    }
}

@media (max-width: 576px) {
    .wish-card {
        margin: 0.5rem 0;
        padding: 1rem;
    }
    
    .message-type-badge {
        font-size: 0.7rem;
    }
    
    .recording-status {
        font-size: 0.9rem;
    }
}

/* Custom scrollbar for audio/video elements */
audio::-webkit-media-controls-panel,
video::-webkit-media-controls-panel {
    background-color: transparent;
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.uploading {
    position: relative;
    overflow: hidden;
}

.uploading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: uploadShimmer 1.5s infinite;
}

@keyframes uploadShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Error states */
.error-state {
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.1) !important;
}

.error-message {
    color: #721c24;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success states */
.success-state {
    border-color: #28a745 !important;
    background-color: rgba(40, 167, 69, 0.1) !important;
}

/* Duration display */
.duration-display {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

/* Estilos para el modal de mensajes */
#messageModal .modal-content {
    border-radius: 20px;
    border: 2px solid rgba(109, 139, 35, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

#messageModal .modal-header {
    background: linear-gradient(45deg, #6d8b23 0%, #8fbc23 100%);
    color: white;
    border-radius: 18px 18px 0 0;
    border-bottom: none;
}

#messageModal .modal-header.modal-success {
    background: linear-gradient(45deg, #27ae60 0%, #2ecc71 100%);
}

#messageModal .modal-header.modal-error {
    background: linear-gradient(45deg, #e74c3c 0%, #c0392b 100%);
}

#messageModal .modal-header.modal-warning {
    background: linear-gradient(45deg, #f39c12 0%, #e67e22 100%);
}

#messageModal .modal-body {
    padding: 2rem;
    font-size: 1.1rem;
    text-align: center;
    color: #555;
}

#messageModal .modal-footer {
    border-top: none;
    padding: 1rem 2rem 2rem;
    justify-content: center;
}

#messageModal .btn-birthday {
    min-width: 120px;
}