/* --- Global & Archive --- */
.sep-independent-layout { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f4f4f4; }
.sep-archive-wrapper { max-width: 1200px; margin: 0 auto; padding: 20px; }
.sep-header { background: #fff; padding: 20px; text-align: center; border-bottom: 4px solid var(--sep-accent); margin-bottom: 30px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.sep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.sep-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: transform 0.2s; }
.sep-card:hover { transform: translateY(-5px); }
.sep-card-img img { width: 100%; height: 350px; object-fit: cover; display: block; border-bottom: 1px solid #eee; }
.sep-card-content { padding: 15px; }
.sep-date { font-size: 12px; color: #777; text-transform: uppercase; font-weight: bold; }
.sep-card h2 { margin: 10px 0; font-size: 18px; color: #333; }
.sep-btn { display: inline-block; padding: 8px 15px; background: var(--sep-accent); color: #fff; text-decoration: none; border-radius: 4px; font-weight: bold; }

/* --- Reader --- */
.sep-reader-body { margin: 0; overflow: hidden; background: var(--sep-bg); font-family: sans-serif; color: #fff; }
#sep-reader-app { display: flex; flex-direction: column; height: 100vh; }
.sep-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; background: #111; z-index: 100; border-bottom: 1px solid #333; }
.sep-toolbar a { color: #fff; text-decoration: none; }
.sep-btn-icon { background: transparent; border: 1px solid #444; color: #fff; padding: 5px 10px; cursor: pointer; border-radius: 4px; margin-left: 5px; }
.sep-btn-icon:hover { background: #333; }
.sep-btn-icon.active { background: var(--sep-accent); border-color: var(--sep-accent); }

#sep-viewport { flex: 1; position: relative; overflow: auto; display: flex; justify-content: center; align-items: center; touch-action: none; }
#sep-canvas-wrapper { position: relative; transform-origin: 0 0; transition: transform 0.2s ease-out; }
#sep-main-image { max-width: 100%; max-height: 80vh; display: block; object-fit: contain; }

/* Navigation */
.sep-nav-btn { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: #fff; border: none; font-size: 40px; padding: 20px 15px; cursor: pointer; z-index: 50; }
.sep-nav-btn:hover { background: rgba(0,0,0,0.8); }
#sep-nav-prev { left: 10px; }
#sep-nav-next { right: 10px; }

/* Thumbnails */
.sep-thumbnails { height: 80px; background: #111; display: flex; gap: 10px; padding: 10px; overflow-x: auto; border-top: 1px solid #333; }
.sep-thumb { height: 100%; cursor: pointer; opacity: 0.5; transition: opacity 0.2s; border: 2px solid transparent; }
.sep-thumb.active, .sep-thumb:hover { opacity: 1; border-color: var(--sep-accent); }

/* Clipping Tool */
#sep-clip-overlay { position: absolute; top:0; left:0; width:100%; height:100%; cursor: crosshair; display: none; z-index: 10; }
#sep-clip-overlay.active { display: block; }
#sep-clip-box { position: absolute; border: 2px dashed #00ff00; background: rgba(0,255,0,0.2); display: none; z-index: 11; pointer-events: none; }
#sep-do-clip { position: absolute; bottom: -30px; right: 0; background: var(--sep-accent); color:#fff; border:none; padding:5px 10px; pointer-events: auto; cursor: pointer; border-radius:4px;}
.sep-share-btn{
    display:inline-block;
    padding:6px 12px;
    margin-right:5px;
    border-radius:4px;
    color:#fff !important;
    text-decoration:none;
    font-size:13px;
    font-weight:600;
}

.whatsapp{
    background:#25D366;
}

.facebook{
    background:#1877F2;
}

.telegram{
    background:#229ED9;
}
.sep-share-btn{
    display:inline-block;
    padding:8px 14px;
    border-radius:5px;
    color:#fff !important;
    text-decoration:none;
    font-weight:600;
    margin-right:5px;
}

.whatsapp{
    background:#25D366;
}

.facebook{
    background:#1877F2;
}

.telegram{
    background:#229ED9;
}
.sep-sidebar{
    width:120px;
    overflow-y:auto;
    max-height:90vh;
}

.sep-thumb-item{
    cursor:pointer;
    margin-bottom:10px;
}

.sep-thumb-item img{
    width:100%;
    border:2px solid #333;
}