/**
 * Capsules CSS - Consolidated styles for all capsule displays
 * Used across: public_capsules.php, my_capsules.php, dashboard.php, home.php, upcoming.php, view_capsule.php
 */

/* ========================================
   HERO SECTIONS
   ======================================== */

.public-hero,
.my-capsules-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 40px;
    border-radius: 20px;
    margin-bottom: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.public-hero h1,
.my-capsules-hero h1 {
    font-size: 3em;
    font-weight: 800;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.public-hero p,
.my-capsules-hero p {
    font-size: 1.2em;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 2.5em;
    font-weight: 800;
    display: block;
}

.hero-stat-label {
    font-size: 0.9em;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   FILTER SECTIONS
   ======================================== */

.filter-section {
    background: white;
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.95em;
}

.filter-info i {
    color: #4facfe;
    font-size: 1.2em;
}

.filter-tabs {
    background: white;
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-tab {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-tab:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.filter-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.filter-tab i {
    font-size: 1.1em;
}

.filter-count {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 700;
}

.filter-tab.active .filter-count {
    background: rgba(255,255,255,0.3);
}

/* ========================================
   CAPSULE GRID & CARDS
   ======================================== */

.capsules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.capsule-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.capsule-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.capsule-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.capsule-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.capsule-title {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.capsule-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

/* ========================================
   CAPSULE BADGES (Status)
   ======================================== */

.capsule-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(10px);
}

.capsule-badge.active {
    background: rgba(102, 126, 234, 0.9);
    color: white;
}

.capsule-badge.opened {
    background: rgba(72, 187, 120, 0.9);
    color: white;
}

.capsule-badge.public {
    background: rgba(66, 153, 225, 0.9);
    color: white;
}

.capsule-badge.private {
    background: rgba(237, 137, 54, 0.9);
    color: white;
}

/* ========================================
   PREMIUM USER EFFECTS
   ======================================== */

/* Premium/VIP Badges (Top Corner) */
.capsule-card.premium-badge::before,
.capsule-card.vip-badge::before {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.capsule-card.premium-badge::before {
    content: "⭐ PREMIUM";
}

.capsule-card.vip-badge::before {
    content: "💎 VIP";
}

/* Effect: Gold Glow */
.capsule-card.effect-gold_glow {
    border: 2px solid #ffd700;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4), 0 0 15px rgba(255, 215, 0, 0.2);
}

.capsule-card.effect-gold_glow:hover {
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6), 0 0 25px rgba(255, 215, 0, 0.3);
    transform: translateY(-10px);
}

/* Effect: Purple Pulse */
.capsule-card.effect-purple_pulse {
    border: 2px solid #a855f7;
    animation: purplePulse 3s ease-in-out infinite;
}

@keyframes purplePulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4); }
    50% { box-shadow: 0 8px 30px rgba(168, 85, 247, 0.7); }
}

.capsule-card.effect-purple_pulse:hover {
    transform: translateY(-10px);
}

/* Effect: Rainbow Shift */
.capsule-card.effect-rainbow_shift {
    border: 2px solid transparent;
    background: 
        linear-gradient(white, white) padding-box,
        linear-gradient(90deg, #ff0080, #ff8c00, #40e0d0, #ff0080) border-box;
    background-size: 300% 300%;
    animation: rainbowShift 5s linear infinite;
}

@keyframes rainbowShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.capsule-card.effect-rainbow_shift:hover {
    transform: translateY(-10px);
}

/* Effect: Sparkle */
.capsule-card.effect-sparkle {
    border: 2px solid #ffd700;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.capsule-card.effect-sparkle:hover {
    transform: translateY(-10px);
}

.capsule-card.effect-sparkle:hover::after {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2em;
    animation: sparkleFloat 1s ease-out;
    pointer-events: none;
}

@keyframes sparkleFloat {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* Effect: Holographic */
.capsule-card.effect-holographic {
    border: 2px solid transparent;
    background: 
        linear-gradient(white, white) padding-box,
        linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #667eea 100%) border-box;
    background-size: 400% 400%;
    animation: holographicShine 8s ease infinite;
}

@keyframes holographicShine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.capsule-card.effect-holographic:hover {
    transform: translateY(-10px);
}

/* ========================================
   CAPSULE META
   ======================================== */

.capsule-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.capsule-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.capsule-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.capsule-date i {
    color: #667eea;
    width: 16px;
}

.capsule-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.85em;
}

.capsule-stat i {
    color: #667eea;
}

/* ========================================
   CAPSULE ACTIONS
   ======================================== */

.capsule-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #edf2f7;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.link-button:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-btn:hover {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.page-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-btn:disabled:hover {
    border-color: var(--border-color);
    background: white;
    color: var(--text-primary);
}

.page-info {
    padding: 0 15px;
    color: var(--text-secondary);
    font-size: 0.95em;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.empty-state-icon {
    font-size: 5em;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.8em;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.1em;
    margin-bottom: 25px;
}

/* ========================================
   DASHBOARD SPECIFIC STYLES
   ======================================== */

.welcome-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.welcome-banner h2 {
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: 700;
}

.welcome-banner p {
    opacity: 0.95;
    font-size: 1.1em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea, #764ba2);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #667eea20, #667eea40);
    color: #667eea;
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #48bb7820, #48bb7840);
    color: #48bb78;
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #ed893620, #ed893640);
    color: #ed8936;
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #429de120, #429de140);
    color: #429de1;
}

.stat-number {
    font-size: 2.5em;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 5px;
    line-height: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.section-header {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    font-weight: 700;
    font-size: 1.3em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    font-size: 1.2em;
}

.section-count {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.capsule-list {
    padding: 0;
}

.capsule-item {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 20px;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.capsule-item:hover {
    background-color: #f8fafc;
    border-left: 4px solid var(--primary-color);
    padding-left: 26px;
}

.capsule-item:last-child {
    border-bottom: none;
}

.capsule-icon {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    flex-shrink: 0;
}

.capsule-icon.active {
    background: linear-gradient(135deg, #667eea20, #667eea40);
    color: #667eea;
}

.capsule-icon.opened {
    background: linear-gradient(135deg, #48bb7820, #48bb7840);
    color: #48bb78;
}

.capsule-icon.waiting {
    background: linear-gradient(135deg, #ed893620, #ed893640);
    color: #ed8936;
}

.capsule-info {
    flex: 1;
    min-width: 0;
}

.capsule-preview {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 8px;
    line-height: 1.5;
}

.capsule-status {
    text-align: right;
    flex-shrink: 0;
}

.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 8px;
}

.status-badge.active {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.opened {
    background: #e8f5e8;
    color: #388e3c;
}

.status-badge.waiting {
    background: #fff3e0;
    color: #f57c00;
}

.time-remaining {
    font-size: 0.85em;
    color: var(--text-secondary);
    font-weight: 500;
}

.no-capsules {
    text-align: center;
    padding: 60px 40px;
    color: var(--text-secondary);
}

.no-capsules-icon {
    font-size: 4em;
    color: var(--border-color);
    margin-bottom: 20px;
}

.no-capsules h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.5em;
}

.no-capsules p {
    margin-bottom: 25px;
    font-size: 1.05em;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .public-hero h1,
    .my-capsules-hero h1 {
        font-size: 2em;
        flex-direction: column;
    }
    
    .public-hero p,
    .my-capsules-hero p {
        font-size: 1em;
    }
    
    .capsules-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-row {
        gap: 20px;
    }
    
    .hero-stat-value {
        font-size: 2em;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .filter-section {
        flex-direction: column;
        text-align: center;
    }
    
    .filter-tabs {
        flex-direction: column;
    }
    
    .filter-tab {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 2em;
    }
    
    .capsule-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }
    
    .capsule-status {
        text-align: left;
        width: 100%;
    }
    
    .capsule-actions {
        width: 100%;
    }
    
    .capsule-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .welcome-banner {
        padding: 30px 20px;
    }
    
    .welcome-banner h2 {
        font-size: 1.5em;
    }
}

