/* Authentication Styles */
.auth-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(45, 27, 105, 0.3);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(159, 122, 234, 0.3);
}

.auth-container h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.auth-description {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(45, 27, 105, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(159, 122, 234, 0.3);
}

.auth-error {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.5);
    color: #fca5a5;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.auth-success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #86efac;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.auth-toggle {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
}

.auth-toggle a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

/* User Menu */
.user-menu {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-email {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.user-menu .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Reading Status Banner */
.reading-status-banner {
    background: rgba(159, 122, 234, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.reading-status-banner.warning {
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.5);
}

.reading-status-banner.error {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.5);
}

.reading-count {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subscribe-prompt {
    margin-top: 1rem;
}

.subscribe-prompt .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Subscription Management */
.subscription-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(45, 27, 105, 0.3);
    border: 2px solid var(--border-color);
    border-radius: 15px;
}

.subscription-status {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #86efac;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.subscription-status.inactive {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.5);
    color: #fca5a5;
}

.subscription-details {
    margin: 1.5rem 0;
}

.subscription-details p {
    margin: 0.5rem 0;
    color: var(--text-color);
}

.subscription-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(159, 122, 234, 0.3);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Reading History Styles */
.reading-history-container {
    margin-top: 1rem;
}

.reading-card {
    background: rgba(45, 27, 105, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reading-card:hover {
    background: rgba(45, 27, 105, 0.5);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(138, 82, 255, 0.3);
}

.reading-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.reading-date {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.reading-question {
    font-style: italic;
    color: var(--text-color);
    margin: 0.5rem 0;
    line-height: 1.4;
}

.reading-meta {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(138, 82, 255, 0.2);
}

/* Reading Card Thumbnails */
.reading-card-thumbnails {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.card-thumbnail {
    width: 60px;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: rgba(45, 27, 105, 0.2);
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-thumbnail-more {
    width: 60px;
    height: 100px;
    border-radius: 4px;
    border: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 1.2rem;
    font-weight: bold;
    background: rgba(45, 27, 105, 0.1);
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 0.5rem;
    z-index: 1000;
}

.lang-btn {
    background: rgba(138, 82, 255, 0.2);
    border: 2px solid rgba(138, 82, 255, 0.5);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(138, 82, 255, 0.4);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.lang-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(138, 82, 255, 0.4);
}

/* Email Verification Banner */
.verification-banner {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.2));
    border: 2px solid rgba(251, 191, 36, 0.5);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease-out;
}

.verification-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.verification-banner-content span {
    color: #fbbf24;
    font-weight: 500;
    flex: 1;
}

.verification-banner-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-link {
    background: transparent;
    border: 1px solid rgba(251, 191, 36, 0.5);
    color: #fbbf24;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-link:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: #fbbf24;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reading History Card Thumbnails */
.reading-thumbnails {
    display: flex;
    gap: 0.5rem;
    margin: 0.75rem 0;
    align-items: center;
}

.reading-thumbnail {
    width: 50px;
    height: auto;
    border-radius: 4px;
    border: 2px solid var(--border-color);
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.reading-thumbnail:hover {
    transform: scale(1.1) !important;
    border-color: var(--accent-color);
}

.more-cards {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 87px;
    background: rgba(138, 82, 255, 0.2);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Download button in reading history */
.btn-download-history {
    background: rgba(218, 165, 32, 0.2);
    border: 1px solid rgba(218, 165, 32, 0.5);
    color: #DAA520;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-download-history:hover {
    background: rgba(218, 165, 32, 0.3);
    border-color: #DAA520;
}

.reading-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}
