/* ===== AMAZON AUTHOR PAGE STYLES - OPTIMIZED VERSION ===== */

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

body {
    font-family: "Amazon Ember", Arial, sans-serif;
    background: #ffffff;
    color: #0f1111;
    line-height: 1.4;
}

/* ===== CONTAINER PRINCIPAL ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== HEADER ESTILO AMAZON ===== */
.amazon-header {
    background: #ffffff;
    border-bottom: 1px solid #ddd;
    padding: 16px 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f0f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #565959;
    flex-shrink: 0;
}

.author-info h1 {
    font-size: 28px;
    font-weight: 400;
    color: #0f1111;
    margin-bottom: 4px;
}

.author-follow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.follow-btn {
    background: #fff;
    border: 1px solid #d5d9d9;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    color: #0f1111;
    cursor: pointer;
    transition: all 0.15s ease;
}

.follow-btn:hover {
    background: #f7fafa;
    border-color: #007185;
}

.categories-link {
    color: #007185;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
}

/* ===== BOTÓN CAMBIO DE IDIOMA ===== */
.language-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 12px;
    color: #007185;
    text-decoration: none;
    padding: 4px 8px;
    border: 1px solid #d5d9d9;
    border-radius: 4px;
    background: #f7fafa;
    transition: all 0.15s ease;
}

.language-toggle:hover {
    background: #007185;
    color: white;
    border-color: #007185;
}

/* ===== SECCIÓN ABOUT ===== */
.about-section {
    background: #ffffff;
    padding: 24px 0;
    border-bottom: 1px solid #e6e6e6;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f1111;
    margin-bottom: 12px;
}

.author-bio {
    color: #565959;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.read-more {
    color: #007185;
    text-decoration: none;
    font-size: 14px;
}

.read-more:hover {
    color: #c7511f;
    text-decoration: underline;
}

/* ===== SECCIÓN LIBROS ===== */
.books-section {
    padding: 24px 0;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

/* ===== TARJETA DE LIBRO ESTILO AMAZON ===== */
.book-card {
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.15s ease;
    position: relative;
}

.book-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #007185;
    transform: translateY(-2px);
}

.book-image-container {
    padding: 16px;
    text-align: center;
    background: #f7fafa;
}

.book-image {
    width: 140px;
    height: 200px;
    margin: 0 auto;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: relative;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f2f2 0%, #e6e6e6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #565959;
}

/* ===== CONTENIDO DE LA TARJETA ===== */
.book-content {
    padding: 16px;
}

.book-title {
    font-size: 16px;
    font-weight: 400;
    color: #007185;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    line-height: 1.3;
}

.book-title:hover {
    color: #c7511f;
    text-decoration: underline;
}

.book-format {
    font-size: 13px;
    color: #565959;
    margin-bottom: 4px;
}

.book-price {
    font-size: 18px;
    font-weight: 700;
    color: #B12704;
    margin-bottom: 12px;
}

.book-details {
    font-size: 13px;
    color: #565959;
    margin-bottom: 12px;
}

/* ===== BOTÓN AMAZON ===== */
.amazon-button {
    background: #ff9900;
    border: 1px solid #ff9900;
    border-radius: 8px;
    color: #0f1111;
    cursor: pointer;
    display: block;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    padding: 10px 16px;
    text-align: center;
    text-decoration: none;
    width: 100%;
    transition: all 0.15s ease;
}

.amazon-button:hover {
    background: #fa8900;
    border-color: #fa8900;
}

.amazon-button:active {
    background: #ff9900;
    border-color: #ff9900;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

/* ===== BADGES ===== */
.kindle-edition {
    background: #007185;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-right: 8px;
}

/* ===== ADMIN BUTTON ===== */
.admin-access {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: #ccc;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    z-index: 100;
    transition: all 0.3s ease;
}

.admin-access:hover {
    background: #007185;
    color: white;
    transform: scale(1.05);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.modal-title {
    font-size: 18px;
    color: #0f1111;
    margin-bottom: 16px;
}

.modal-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d5d9d9;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 16px;
}

.modal-input:focus {
    outline: none;
    border-color: #007185;
    box-shadow: 0 0 0 3px rgba(0,113,133,0.1);
}

.modal-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.modal-btn {
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    border: 1px solid #d5d9d9;
    transition: all 0.15s ease;
}

.modal-btn.primary {
    background: #ff9900;
    border-color: #ff9900;
    color: #0f1111;
}

.modal-btn.primary:hover {
    background: #fa8900;
}

.modal-btn.secondary {
    background: white;
    color: #0f1111;
}

.modal-btn.secondary:hover {
    background: #f7fafa;
}

/* ===== VISTA ADMIN AVANZADA ===== */
.admin-view {
    display: none;
    background: #f7f8fa;
    min-height: 100vh;
}

.admin-view.active {
    display: block;
}

.public-view.hidden {
    display: none;
}

/* ===== ADMIN HEADER ===== */
.admin-header {
    background: linear-gradient(135deg, #232f3e 0%, #37475a 100%);
    padding: 20px 0;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-header h2 {
    color: white !important;
    font-size: 24px;
    font-weight: 700;
}

.logout-btn {
    float: right;
    background: #ff9900;
    color: #0f1111;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: #ff8c00;
}

/* ===== NAVEGACIÓN ADMIN ===== */
.admin-nav {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.admin-nav-btn {
    background: white;
    border: 2px solid #e6e6e6;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    color: #565959;
}

.admin-nav-btn:hover {
    border-color: #007185;
    color: #007185;
}

.admin-nav-btn.active {
    background: #007185;
    border-color: #007185;
    color: white;
}

/* ===== SECCIONES ADMIN ===== */
.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

/* ===== DASHBOARD RÁPIDO ===== */
.quick-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.quick-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.quick-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.quick-number {
    font-size: 24px;
    font-weight: bold;
    color: #007185;
    margin-bottom: 5px;
}

.quick-label {
    color: #565959;
    font-size: 14px;
    margin-bottom: 8px;
}

.quick-tip {
    font-size: 12px;
    color: #B12704;
    font-weight: 500;
}

/* ===== GRID DE ACCIONES ===== */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.action-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ccc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.action-card.priority-high {
    border-left-color: #ff4444;
}

.action-card.priority-medium {
    border-left-color: #ffaa00;
}

.action-card.priority-low {
    border-left-color: #00aa44;
}

.action-item {
    display: flex;
    flex-direction: column;
    margin: 12px 0;
    padding: 10px;
    background: #f7fafa;
    border-radius: 5px;
}

.action-item input {
    margin-right: 10px;
    transform: scale(1.2);
}

.action-item label {
    font-weight: 500;
    color: #0f1111;
    cursor: pointer;
    margin-bottom: 5px;
}

.action-tip {
    font-size: 12px;
    color: #007185;
    font-style: italic;
    margin-left: 25px;
}

/* ===== PROGRESO ===== */
.progress-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e6e6e6;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00aa44, #4caf50);
    transition: width 0.5s ease;
}

/* ===== ADS GRID ===== */
.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.ads-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ads-metric {
    font-size: 20px;
    font-weight: bold;
    color: #0f1111;
    margin: 10px 0;
}

.ads-status.good {
    color: #00aa44;
    font-size: 14px;
}

.keyword-list div {
    margin: 8px 0;
    padding: 5px;
    background: #f0f2f2;
    border-radius: 3px;
    font-size: 13px;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
}

.metric-good {
    color: #00aa44;
    font-weight: bold;
}

.metric-warning {
    color: #ff6600;
    font-weight: bold;
}

.ads-tip {
    color: #565959;
    font-size: 12px;
    margin-top: 8px;
    font-style: italic;
}

/* ===== ACCIONES RÁPIDAS ===== */
.quick-actions {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.quick-btn {
    background: #007185;
    color: white;
    border: none;
    padding: 8px 15px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.quick-btn:hover {
    background: #005a6b;
}

/* ===== CONTENIDO GRID ===== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.content-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.content-item {
    margin: 12px 0;
    padding: 10px;
    background: #f7fafa;
    border-radius: 5px;
}

.content-tip {
    font-size: 12px;
    color: #007185;
    margin-top: 5px;
}

.topic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    padding: 8px;
    background: #f0f2f2;
    border-radius: 4px;
}

.engagement {
    font-size: 12px;
    color: #00aa44;
    font-weight: bold;
}

/* ===== PLAN HEADER ===== */
.plan-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.mini-progress {
    width: 150px;
    height: 8px;
    background: #e6e6e6;
    border-radius: 4px;
    overflow: hidden;
}

.mini-progress-fill {
    height: 100%;
    background: #00aa44;
    transition: width 0.3s;
}

/* ===== PLAN SECTIONS ===== */
.plan-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.plan-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.plan-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
}

.plan-step.pending {
    background: #fff3cd;
    border-left: 3px solid #ffaa00;
}

.plan-step.completed {
    background: #d4edda;
    border-left: 3px solid #00aa44;
}

.step-btn {
    background: #007185;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.step-btn:hover {
    background: #005a6b;
}

.budget-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    padding: 8px;
    background: #f7fafa;
    border-radius: 4px;
}

.keyword-performance {
    margin-top: 15px;
}

.kw-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    padding: 10px;
    border-radius: 5px;
}

.kw-item.winner {
    background: #d4edda;
}

.kw-item.warning {
    background: #fff3cd;
}

.kw-item.pending {
    background: #e2e3e5;
}

.kw-item button {
    background: #007185;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    transition: background 0.2s;
}

.kw-item button:hover {
    background: #005a6b;
}

.plan-link {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 2px dashed #007185;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.full-plan-btn {
    display: inline-block;
    background: #007185;
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    margin-bottom: 10px;
    transition: background 0.2s;
}

.full-plan-btn:hover {
    background: #005a6b;
}

.plan-tip {
    color: #565959;
    font-size: 13px;
}

.tips-container {
    background: white;
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    display: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ===== TASK GRID (COMPATIBLE CON ADMIN BÁSICO) ===== */
.task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.task-category {
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 16px;
    background: #f7fafa;
}

.task-category h3 {
    color: #0f1111;
    font-size: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid #d5d9d9;
    padding-bottom: 8px;
}

.task-item {
    display: flex;
    align-items: center;
    margin: 8px 0;
    cursor: pointer;
    font-size: 14px;
}

.task-item input {
    margin-right: 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .author-info h1 {
        font-size: 24px;
    }

    .books-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 12px;
    }

    .book-image {
        width: 120px;
        height: 170px;
    }

    .container {
        padding: 0 12px;
    }

    .language-toggle {
        top: 10px;
        right: 10px;
        font-size: 11px;
        padding: 3px 6px;
    }

    .quick-dashboard,
    .action-grid,
    .ads-grid,
    .content-grid,
    .plan-sections {
        grid-template-columns: 1fr;
    }
    
    .plan-header {
        flex-direction: column;
        gap: 15px;
    }

    .admin-nav {
        justify-content: center;
    }

    .admin-nav-btn {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        padding: 0 12px;
    }
}