:root {
    --primary-color: #4285f4;
    --secondary-color: #f8f9fa;
    --border-radius: 8px;
    --box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    --primary-color-rgb: 66, 133, 244; /* Default blue */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans';
}

body {
    background-color: #f8f9fa;
    /*padding: 20px; */
    --primary-color-dark: #3b78db;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Barra de búsqueda de Google */
.search-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /*border-radius: 0 0 8px 8px;*/
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 20px;
    color: white;
    box-shadow: var(--box-shadow);
    text-align: center;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    font-size: 16px;
    outline: none;
}

.search-input:focus {
    box-shadow: 0 1px 6px rgba(32,33,36,.28);
    border-color: rgba(223,225,229,0);
}

/* Botón de búsqueda con animaciones y sombra */
.search-button {
    margin-left: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.search-button:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.search-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Efecto de onda al hacer clic */
.search-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.search-button:focus:not(:active)::after {
    animation: ripple 0.6s ease-out;
}

/* Favoritos */
.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    margin-top: 100px; /* Añadido para compensar el search-container fijo */
}

.favorites-title {
    font-size: 24px;
    color: #202124;
}

.favorites-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    grid-gap: 16px;
}

.favorite-item {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: var(--box-shadow);
    cursor: pointer;
    transition: transform 0.2s;
}

.favorite-item:hover {
    transform: translateY(-5px);
}

.favorite-item .icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    background-size: cover;
    background-position: center;
    margin-bottom: 8px;
}

.favorite-item .description {
    font-size: 12px;
    text-align: center;
    color: #5f6368;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.add-favorite {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    border: 2px dashed #dadce0;
    border-radius: var(--border-radius);
    width: 100%;
    height: 100%;
    min-height: 110px;
    cursor: pointer;
}

.add-favorite span {
    font-size: 32px;
    color: #5f6368;
}

/* Acciones sobre favoritos */
.favorite-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: none;
}

.favorite-item:hover .favorite-actions {
    display: flex;
}

.action-button {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 4px;
    cursor: pointer;
    font-size: 10px;
    color: #5f6368;
}

.action-button:hover {
    background-color: rgba(0,0,0,0.2);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: var(--border-radius);
    width: 80%;
    max-width: 500px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #5f6368;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #dfe1e5;
    border-radius: 4px;
}

.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-cancel {
    background-color: #f1f3f4;
    color: #5f6368;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

/* Botón de donación con animaciones y sombra */
.donation-button {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    min-width: 180px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    justify-content: center;
    font-size: 15px;
    padding: 12px 28px;
    border-radius: 6px;
}

.donation-button i {
    margin-right: 10px;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.donation-button:hover {
    background-color: var(--primary-color-dark, #005ea6);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.donation-button:hover i {
    transform: scale(1.2) rotate(-5deg);
}

.donation-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Efecto de onda al hacer clic en el botón de donación */
.donation-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.donation-button:focus:not(:active)::after {
    animation: ripple 0.6s ease-out;
}

/* Animación de pulso para el botón de donación */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--primary-color-rgb, 0, 112, 186), 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(var(--primary-color-rgb, 0, 112, 186), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--primary-color-rgb, 0, 112, 186), 0);
    }
}

/* Animación de onda */
@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* Icono de configuración */
.settings-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--box-shadow);
    cursor: pointer;
    z-index: 1100;
    transition: transform 0.3s ease;
}

.settings-icon:hover {
    transform: rotate(30deg);
}

.settings-icon i {
    font-size: 20px;
    color: #5f6368;
}

/* Modal de configuración */
.settings-modal-content {
    max-width: 600px;
}

.settings-tabs {
    display: flex;
    border-bottom: 1px solid #dfe1e5;
    margin-bottom: 20px;
}

.settings-tab {
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    color: #5f6368;
}

.settings-tab.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
}

.settings-panel h4 {
    margin: 15px 0;
    color: #202124;
}

/* Temas de color */
.color-themes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.color-theme {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.color-theme:hover {
    transform: scale(1.1);
}

.color-theme.active {
    border: 2px solid #202124;
}

/* Temas específicos */
.color-theme[data-theme="default"] {
    background-color: #f8f9fa;
    border: 2px solid #dfe1e5;
}

.color-theme[data-theme="pastel"] {
    background: linear-gradient(135deg, #ffcdd2, #bbdefb);
}

.color-theme[data-theme="ocean"] {
    background: linear-gradient(135deg, #81d4fa, #4db6ac);
}

.color-theme[data-theme="nature"] {
    background: linear-gradient(135deg, #c5e1a5, #fff9c4);
}

.color-theme[data-theme="sunset"] {
    background: linear-gradient(135deg, #ffcc80, #ef9a9a);
}

.color-theme[data-theme="dark"] {
    background: #202124;
}

/* Selector de imagen de fondo */
.background-image-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

#background-image-input {
    display: none;
}

.background-image-container label {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

/* Importar/Exportar */
.export-container, .import-container {
    margin-bottom: 20px;
}

.export-container p, .import-container p {
    margin-bottom: 10px;
    color: #5f6368;
}

.export-container button, .import-container button {
    margin-right: 10px;
    margin-bottom: 10px;
}

#import-file {
    display: none;
}

/* Estilos para los temas */
body.theme-pastel {
    background-color: #f8e3e3;
    --primary-color: #f48fb1;
    --primary-color-dark: #e47297;
    --primary-color-rgb: 244, 143, 177;
}

body.theme-ocean {
    background-color: #e3f2fd;
    --primary-color: #4fc3f7;
    --primary-color-dark: #39afdc;
    --primary-color-rgb: 79, 195, 247;
}

body.theme-nature {
    background-color: #f1f8e9;
    --primary-color: #8bc34a;
    --primary-color-dark: #7cb342;
    --primary-color-rgb: 139, 195, 74;
}

body.theme-sunset {
    background-color: #fff3e0;
    --primary-color: #ff9800;
    --primary-color-dark: #f57c00;
    --primary-color-rgb: 255, 152, 0;
}

body.theme-dark {
    background-color: #202124;
    color: #e8eaed;
    --primary-color: #8ab4f8;
    --primary-color-dark: #669df6;
    --primary-color-rgb: 138, 180, 248;
}

body.theme-dark .search-container,
body.theme-dark .favorite-item,
body.theme-dark .modal-content {
    background-color: #303134;
    color: #e8eaed;
}

body.theme-dark .search-input,
body.theme-dark .form-group input {
    background-color: #202124;
    color: #e8eaed;
    border-color: #5f6368;
}

body.theme-dark .favorites-title,
body.theme-dark .modal-header h3 {
    color: #e8eaed;
}

body.theme-dark .btn-cancel {
    background-color: #5f6368;
    color: #e8eaed;
}

/* Fondo con imagen */
body.has-background-image {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body.has-background-image .search-container,
body.has-background-image .favorite-item,
body.has-background-image .modal-content,
body.has-background-image .settings-icon {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
}

body.theme-dark.has-background-image .search-container,
body.theme-dark.has-background-image .favorite-item,
body.theme-dark.has-background-image .modal-content,
body.theme-dark.has-background-image .settings-icon {
    background-color: rgba(48, 49, 52, 0.85);
    backdrop-filter: blur(5px);
}

/* Animación de pulso para destacar el botón de donación */
.donation-button.highlight {
    animation: pulse 2s infinite;
}

/* Animación de efecto onda para los botones */
@keyframes ripple-effect {
    to {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* Estilo para el botón de donación cuando cambia de tema */
.donation-button.theme-changing {
    animation: theme-change 0.5s ease;
}

@keyframes theme-change {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Contenedor de donación mejorado */
.donation-container {
    margin-top: 40px;
    margin-bottom: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);

    /*background-color: rgba(255, 255, 255, 0.05);*/
    border-radius: 12px;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    text-align: center;

    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
}

.donation-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--primary-color-rgb), 0.1) 0%, rgba(var(--primary-color-rgb), 0) 70%);
    z-index: -1;
}

.donation-container p {
    font-size: 16px;
    color: #000;
    margin-bottom: 15px;
    max-width: 500px;
    line-height: 1.5;
}

/* Efectos especiales para el modo oscuro */
body.theme-dark .donation-container {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Animación para el contenedor de donación */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.donation-container {
    animation: fadeIn 0.8s ease-out;
}

/* Efecto de pulso suave */
.donation-container:hover .donation-button {
    animation: gentle-pulse 2s infinite;
}

@keyframes gentle-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
    100% {
        transform: scale(1);
    }
}