/* assets/css/digest_detail.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.5);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --success: #10b981;
    --error: #ef4444;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.digest-page {
    max-width: 1000px;
    margin: 60px auto;
    padding: 20px;
    animation: fadeIn 0.8s ease-out;
}

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

/* Glassmorphism Card */
.digest-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
    overflow: hidden;
}

.digest-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.digest-content {
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 768px) {
    .digest-content {
        grid-template-columns: 1fr;
    }
}

.digest-cover-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform: perspective(1000px) rotateY(12deg);
    transition: transform 0.4s ease;
}

.digest-cover-wrapper:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
}

.digest-cover {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.digest-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.digest-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(90deg, #1e293b, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.digest-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.digest-description * {
    font-family: inherit !important;
    color: inherit !important;
    background-color: transparent !important;
}

.digest-description p, 
.digest-description div {
    font-size: 1.1rem !important;
    line-height: 1.7 !important;
    margin-bottom: 16px;
}

.digest-description ul,
.digest-description ol {
    padding-left: 24px;
    margin-bottom: 20px;
}

.digest-description li {
    font-size: 1.1rem !important;
    line-height: 1.7 !important;
    margin-bottom: 10px;
    padding-left: 4px;
}

.digest-description li::marker {
    color: var(--primary);
}

.digest-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.digest-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
}

.buy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.buy-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(99, 102, 241, 0.4);
}

/* Modal styling */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    margin-bottom: 25px;
}

.modal-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    color: var(--text-main);
}

.modal-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.form-group {
    margin-bottom: 25px;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255,255,255,0.8);
    color: var(--text-main);
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.modal-actions {
    display: flex;
    gap: 15px;
}

.btn-secondary {
    flex: 1;
    background: rgba(0,0,0,0.05);
    color: var(--text-main);
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(0,0,0,0.1);
}

.btn-primary {
    flex: 1;
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 15px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Messages */
.messages-container {
    margin-bottom: 30px;
}
.message {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.5s ease-out;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
.message.success { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.message.error { background: rgba(239, 68, 68, 0.1); color: var(--error); border: 1px solid rgba(239, 68, 68, 0.2); }
