html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* CCM Library - Centro Creadores Musicales Design */

:root {
    /* Colores principales basados en el dise�o */
    --cyan-primary: #17a2b8;
    --cyan-light: #5dced8;
    --yellow-primary: #e8c547;
    --yellow-light: #f5d976;
    --purple-primary: #c8b3d4;
    --purple-light: #dccee5;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --background: #f8f9fa;
    --shadow: rgba(0, 0, 0, 0.1);
}

* {
    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: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Top User Bar */
.top-user-bar {
    background: transparent;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
}

.top-user-bar .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 3rem;
}

/* User Info in Top Bar */
.user-info-navbar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, var(--yellow-primary) 0%, var(--yellow-light) 100%);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(232, 197, 71, 0.3);
}

.user-info-navbar .user-welcome {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.05rem;
}

.user-info-navbar .logout-btn {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-dark);
    border: 2px solid rgba(255, 255, 255, 0.7);
    padding: 8px 22px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-info-navbar .logout-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--white);
    transform: translateY(-2px);
}

/* User Info (deprecated - keeping for backward compatibility) */
.user-info {
    background: linear-gradient(135deg, var(--yellow-primary) 0%, var(--yellow-light) 100%);
    padding: 1rem 2rem;
    border-radius: 50px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 400px;
    margin-left: auto;
}

.user-welcome {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.05rem;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.3);
    color: var(--text-dark);
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Search Container */
.search-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Banner Section */
.banner-section {
    background: linear-gradient(135deg, var(--purple-primary) 0%, var(--purple-light) 100%);
    padding: 3.5rem 6rem;
    border-radius: 30px;
    box-shadow: 0 8px 25px var(--shadow);
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    flex-shrink: 0;
    min-width: 550px;
}

.banner-section .label-top {
    color: #6b5c7a;
    font-size: 2.5rem;
    font-weight: 600;
}

.banner-section .label-bottom {
    color: var(--white);
    font-size: 3.2rem;
    font-weight: 700;
}

/* Search Wrapper */
.search-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.search-form {
    display: flex;
    gap: 0;
    align-items: center;
    background: var(--white);
    border: 3px solid var(--cyan-light);
    border-radius: 50px;
    padding: 6px 6px 6px 24px;
    box-shadow: 0 4px 15px var(--shadow);
    width: 100%;
    max-width: 550px;
}

.search-input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 1.05rem;
    background: transparent;
}

.search-input:focus {
    outline: none;
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-btn {
    background: transparent;
    color: var(--cyan-primary);
    border: none;
    padding: 10px 14px;
    border-radius: 50%;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-shrink: 0;
}

.search-btn:hover {
    transform: scale(1.15);
    color: #0d7a87;
    box-shadow: none;
}

/* Tabs */
.nav-tabs {
    border: none;
    background: transparent;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-tabs .nav-item {
    flex: 1;
    min-width: 250px;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 50px;
    padding: 15px 30px;
    font-weight: 600;
    font-size: 1.05rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Tab Icon Styles */
.tab-icon {
    width: 50px;
    height: 50px;
    background: var(--white);
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Libros F�sicos - Cyan */
.nav-tabs .nav-item:nth-child(1) .nav-link {
    background: linear-gradient(135deg, var(--cyan-primary) 0%, var(--cyan-light) 100%);
    color: var(--white);
}

.nav-tabs .nav-item:nth-child(1) .nav-link:hover {
    background: linear-gradient(135deg, #138a9e 0%, #4ab8c4 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.3);
}

.nav-tabs .nav-item:nth-child(1) .nav-link.active {
    background: linear-gradient(135deg, #0f7482 0%, #3aa5b1 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(23, 162, 184, 0.4);
}

/* Discos F�sicos - Yellow */
.nav-tabs .nav-item:nth-child(2) .nav-link {
    background: linear-gradient(135deg, var(--yellow-primary) 0%, var(--yellow-light) 100%);
    color: var(--text-dark);
}

.nav-tabs .nav-item:nth-child(2) .nav-link:hover {
    background: linear-gradient(135deg, #d4b03e 0%, #f0cf5f 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(232, 197, 71, 0.3);
}

.nav-tabs .nav-item:nth-child(2) .nav-link.active {
    background: linear-gradient(135deg, #c4a036 0%, #e0bf4f 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(232, 197, 71, 0.4);
}

/* Libros Electr�nicos - Purple */
.nav-tabs .nav-item:nth-child(3) .nav-link {
    background: linear-gradient(135deg, var(--purple-primary) 0%, var(--purple-light) 100%);
    color: var(--white);
}

.nav-tabs .nav-item:nth-child(3) .nav-link:hover {
    background: linear-gradient(135deg, #b8a0c7 0%, #d0bfdb 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(200, 179, 212, 0.3);
}

.nav-tabs .nav-item:nth-child(3) .nav-link.active {
    background: linear-gradient(135deg, #a890b7 0%, #c0afcb 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(200, 179, 212, 0.4);
}

/* Cards */
.result-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
}

/* Card base styles */
.result-card {
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 5px 20px var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

/* Card Icon Styles */
.card-icon {
    position: absolute;
    top: -25px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.result-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.result-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

.result-card h5 {
    margin-top: 25px;
}

/* Libros F�sicos cards - Cyan background */
[data-tab="libros-fisicos"] .result-card {
    background: linear-gradient(135deg, #b8e6eb 0%, #d4f1f4 100%);
    border: 3px solid var(--cyan-light);
}

[data-tab="libros-fisicos"] .result-card h5 {
    color: #0d7a87;
}

[data-tab="libros-fisicos"] .result-card .field-label {
    color: #0d7a87;
}

[data-tab="libros-fisicos"] .result-card .field-value {
    color: #2c5f68;
}

/* Discos F�sicos cards - Yellow background */
[data-tab="discos-fisicos"] .result-card {
    background: linear-gradient(135deg, #f5eab8 0%, #faf3d4 100%);
    border: 3px solid var(--yellow-light);
}

[data-tab="discos-fisicos"] .result-card h5 {
    color: #9a7d2e;
}

[data-tab="discos-fisicos"] .result-card .field-label {
    color: #9a7d2e;
}

[data-tab="discos-fisicos"] .result-card .field-value {
    color: #6b5720;
}

/* Libros Electr�nicos cards - Purple background */
[data-tab="libros-electronicos"] .result-card {
    background: linear-gradient(135deg, #e8dff0 0%, #f0e9f5 100%);
    border: 3px solid var(--purple-light);
}

[data-tab="libros-electronicos"] .result-card h5 {
    color: #7d5c92;
}

[data-tab="libros-electronicos"] .result-card .field-label {
    color: #7d5c92;
}

[data-tab="libros-electronicos"] .result-card .field-value {
    color: #5c4369;
}

.result-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.result-card h5 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.result-card .card-field {
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 1;
}

.result-card .card-field:last-of-type {
    border-bottom: none;
}

.result-card .field-label {
    font-weight: 700;
    margin-right: 0.5rem;
    font-size: 0.95rem;
}

.result-card .field-value {
    font-size: 0.95rem;
    font-weight: 500;
}

.download-btn {
    background: linear-gradient(135deg, var(--yellow-primary) 0%, var(--yellow-light) 100%);
    color: var(--text-dark);
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(232, 197, 71, 0.3);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(232, 197, 71, 0.4);
    color: var(--text-dark);
    text-decoration: none;
}

/* Login Page */
.login-header {
    background: linear-gradient(135deg, var(--cyan-primary) 0%, var(--cyan-light) 100%);
    padding: 3rem 2rem;
    border-radius: 30px;
    box-shadow: 0 8px 25px var(--shadow);
    margin-bottom: 2.5rem;
    clip-path: polygon(0 0, 85% 0, 100% 15%, 100% 100%, 0 100%);
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
}

.login-logo {
    width: 280px;
    height: auto;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.15));
}

.login-gif {
    width: 180px;
    height: auto;
    mix-blend-mode: multiply;
}

.login-books {
    width: 200px;
    height: auto;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.1));
}

.login-container {
    max-width: 480px;
    margin: 0 auto 3rem auto;
    background: var(--white);
    padding: 3rem 3rem 2.5rem 3rem;
    border-radius: 25px;
    box-shadow: 0 15px 40px var(--shadow);
    text-align: center;
    position: relative;
    overflow: visible;
}

.login-icon-circle {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--cyan-primary) 0%, var(--cyan-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -55px auto 1.5rem auto;
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.35);
    color: var(--white);
    font-size: 1.6rem;
}

.login-container h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 2.2rem;
    font-weight: 700;
}

.login-container p {
    color: var(--text-light);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.google-login-btn {
    background: linear-gradient(135deg, var(--cyan-primary) 0%, var(--cyan-light) 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.google-login-btn:hover {
    background: linear-gradient(135deg, #138a9e 0%, #4ab8c4 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
    color: white;
    text-decoration: none;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 5px 20px var(--shadow);
}

.no-results h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 700;
}

.no-results p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--text-dark) 0%, #34495e 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

.footer a {
    color: var(--cyan-light);
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .top-user-bar {
        position: relative;
        background: rgba(255, 255, 255, 0.9);
        padding: 0.5rem 0;
    }
    
    .top-user-bar .container-fluid {
        padding: 0.5rem 1rem;
    }
    
    .user-info-navbar {
        width: 100%;
        justify-content: center;
    }
    
    .result-cards {
        grid-template-columns: 1fr;
    }
    
    .search-form {
        flex-direction: column;
        padding: 15px;
        gap: 10px;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .search-section {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
    }
    
    .search-labels .label-top {
        font-size: 1.3rem;
    }
    
    .search-labels .label-bottom {
        font-size: 1.8rem;
    }
    
    .search-form {
        margin-top: 0;
        max-width: 100%;
    }
    
    .nav-tabs .nav-item {
        min-width: 100%;
    }
    
    .login-header {
        clip-path: none;
        border-radius: 20px;
        min-height: auto;
        padding: 2rem 1.5rem;
    }
    
    .login-header-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .login-logo {
        width: 160px;
    }
    
    .login-gif {
        width: 140px;
    }
    
    .login-books {
        width: 140px;
    }
    
    .login-container {
        margin: 0 1rem 2rem 1rem;
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--cyan-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Container adjustments */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 20px;
}