/**
 * Frontend CSS
 * Cryptomus Membership System
 */

/* ===================================
   Pricing Page Styles
   =================================== */

.cryptomus-pricing-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.cryptomus-pricing-header {
    text-align: center;
    margin-bottom: 50px;
}

.cryptomus-pricing-header h1 {
    font-size: 42px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.cryptomus-pricing-header p {
    font-size: 18px;
    color: #666;
}

.cryptomus-pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.cryptomus-pricing-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.cryptomus-pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.cryptomus-pricing-card.featured {
    border-color: #667eea;
    background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 100%);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
}

.cryptomus-pricing-card.featured:hover {
    box-shadow: 0 16px 32px rgba(102, 126, 234, 0.35);
}

.card-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 5px 0;
}

.card-subtitle {
    font-size: 14px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;    margin: 0 0 20px 0;
}

.card-price {
    margin: 25px 0;
}

.card-price .currency {
    font-size: 24px;
    color: #666;
    vertical-align: super;
}

.card-price .amount {
    font-size: 52px;
    font-weight: 700;
    color: #333;
}

.card-price .period {
    font-size: 16px;
    color: #999;
}

.card-features ul {
    list-style: none;
    padding: 0;
    margin: 25px 0;
    text-align: left;
}

.card-features li {
    padding: 10px 0;
    font-size: 15px;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.card-features li:last-child {
    border-bottom: none;
}

.card-note {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.card-note p {
    margin: 8px 0;
    font-size: 14px;
    color: #555;
}

.card-note .note-small {
    font-size: 12px;
    color: #ff9800;
}

.cryptomus-subscribe-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.cryptomus-subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

.cryptomus-fair-use {
    background: #fff8f0;
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 25px;
    margin-top: 40px;
}

.cryptomus-fair-use h3 {
    margin: 0 0 15px 0;
    color: #e65100;
}

.cryptomus-fair-use ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cryptomus-fair-use li {
    padding: 8px 0;
    color: #555;
}

/* ===================================
   Download Box Styles
   =================================== */

.cryptomus-download-box {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    text-align: center;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cryptomus-state-login-required {
    border-color: #2196F3;
    background: linear-gradient(135deg, #f5f9ff 0%, #ffffff 100%);
}

.cryptomus-state-membership-required {
    border-color: #FF9800;
    background: linear-gradient(135deg, #fff8f0 0%, #ffffff 100%);
}

.cryptomus-state-ready {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
}

.cryptomus-state-limit-reached {
    border-color: #FFC107;
    background: linear-gradient(135deg, #fffbf0 0%, #ffffff 100%);
}

.cryptomus-state-expired {
    border-color: #F44336;
    background: linear-gradient(135deg, #fff0f0 0%, #ffffff 100%);
}

.cryptomus-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.cryptomus-title {
    font-size: 24px;
    font-weight: 600;
    margin: 12px 0;
    color: #333;
}

.cryptomus-message {
    font-size: 16px;
    color: #666;
    margin: 12px 0;
    line-height: 1.6;
}

.cryptomus-safety-note {
    margin: 10px auto 0;
    padding: 8px 12px;
    max-width: 520px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 8px;
    background: rgba(255, 255, 255, .85);
    color: #2f2f2f;
    font-size: 13px;
    line-height: 1.5;
}

.cryptomus-price-hint {
    font-size: 18px;
    color: #ff9800;
    font-weight: 600;
    margin: 16px 0;
}

.cryptomus-quota {
    margin: 20px 0;
}

.quota-display {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 8px 0;
}

.quota-reset {
    font-size: 14px;
    color: #999;
    margin: 8px 0;
}

.cryptomus-countdown {
    font-weight: 600;
    color: #2196F3;
}

.cryptomus-upgrade-hint {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: left;
}

.cryptomus-upgrade-hint ul {
    margin: 10px 0;
    padding-left: 20px;
}

.cryptomus-actions {
    margin-top: 20px;
}

.cryptomus-btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 8px 4px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.cryptomus-btn-primary {
    background: #2196F3;
    color: white;
}

.cryptomus-btn-primary:hover {
    background: #1976D2;
    transform: translateY(-2px);
}

.cryptomus-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.cryptomus-btn-secondary:hover {
    background: #e0e0e0;
}

.cryptomus-btn-upgrade,
.cryptomus-btn-download,
.cryptomus-btn-renew {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.cryptomus-btn-download:hover,
.cryptomus-btn-upgrade:hover,
.cryptomus-btn-renew:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

/* ===================================
   Dashboard Styles
   =================================== */

.cryptomus-dashboard {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.dashboard-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dashboard-section h2,
.dashboard-section h3 {
    margin-top: 0;
    color: #333;
}

.membership-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
}

.membership-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.membership-badge {
    font-size: 24px;
    font-weight: 700;
}

.membership-status {
    background: rgba(255,255,255,0.3);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
}

.membership-details p {
    margin: 10px 0;
    font-size: 16px;
}

.membership-warning {
    background: rgba(255,152,0,0.2);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.btn-renew,
.btn-primary {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 10px;
}

.usage-bar-container {
    margin: 20px 0;
}

.usage-bar {
    background: #f0f0f0;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    margin: 8px 0;
}

.usage-fill {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    transition: width 0.3s ease;
}

.usage-text {
    font-size: 14px;
    color: #666;
}

.download-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.download-history-table th,
.download-history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.download-history-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

.type-free {
    background: #e3f2fd;
    color: #1976d2;
}

.type-video {
    background: #f3e5f5;
    color: #7b1fa2;
}

.type-member {
    background: #e8f5e9;
    color: #388e3c;
}

.type-paid,
.type-paid_over {
    background: #e8f5e9;
    color: #1b5e20;
}

.type-pending,
.type-process,
.type-check,
.type-confirm_check {
    background: #fff8e1;
    color: #8a6d1a;
}

.type-failed,
.type-fail,
.type-cancel,
.type-system_fail,
.type-wrong_amount,
.type-expired {
    background: #ffebee;
    color: #b71c1c;
}

/* ===================================
   Corner Login Widget
   =================================== */

#cryptomus-corner-login {
    position: fixed;
    top: var(--cryptomus-corner-top, 18px);
    right: var(--cryptomus-corner-right, 18px);
    left: auto;
    z-index: 99990;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.admin-bar #cryptomus-corner-login {
    top: calc(var(--cryptomus-corner-top, 18px) + 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar #cryptomus-corner-login {
        top: calc(var(--cryptomus-corner-top, 18px) + 46px);
    }
}

#cryptomus-corner-login .cryptomus-corner-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#cryptomus-corner-login a {
    text-decoration: none;
    border-bottom: none;
    box-shadow: none;
}

#cryptomus-corner-login .cryptomus-corner-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, .1);
    background: rgba(255, 255, 255, .93);
    color: #222;
    padding: 8px 14px;
    line-height: 1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}

#cryptomus-corner-login .cryptomus-corner-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, .18);
    background: #fff;
}

#cryptomus-corner-login .cryptomus-corner-btn-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
}

#cryptomus-corner-login .cryptomus-corner-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, .08);
    display: block;
}

#cryptomus-corner-login .cryptomus-corner-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#cryptomus-corner-login .cryptomus-corner-menu {
    position: relative;
}

#cryptomus-corner-login .cryptomus-corner-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 220px;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, .08);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
    display: none;
    transform-origin: top right;
    animation: cryptomus-corner-fade-in .2s ease;
}

#cryptomus-corner-login .cryptomus-corner-dropdown a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: #222;
    font-size: 13px;
    font-weight: 500;
}

#cryptomus-corner-login .cryptomus-corner-dropdown a:hover {
    background: rgba(0, 0, 0, .05);
}

#cryptomus-corner-login .cryptomus-corner-meta {
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    margin-bottom: 6px;
    padding: 6px 8px 10px;
}

#cryptomus-corner-login .cryptomus-corner-plan {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #111;
}

#cryptomus-corner-login .cryptomus-corner-usage {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

#cryptomus-corner-login .cryptomus-corner-open .cryptomus-corner-dropdown {
    display: block;
}

#cryptomus-corner-login .cryptomus-corner-modal[hidden] {
    display: none;
}

#cryptomus-corner-login .cryptomus-corner-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
}

#cryptomus-corner-login .cryptomus-corner-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .35);
}

#cryptomus-corner-login .cryptomus-corner-modal-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(94vw, 420px);
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 24px 44px rgba(0, 0, 0, .24);
    padding: 20px;
}

#cryptomus-corner-login .cryptomus-corner-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 0;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: #444;
    cursor: pointer;
}

#cryptomus-corner-login .cryptomus-corner-modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

#cryptomus-corner-login .cryptomus-corner-modal-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

#cryptomus-corner-login .cryptomus-corner-modal-head h4 {
    margin: 0 0 4px;
    font-size: 18px;
}

#cryptomus-corner-login .cryptomus-corner-modal-head p {
    margin: 0;
    color: #666;
    font-size: 13px;
}

#cryptomus-corner-login .cryptomus-corner-modal-body p {
    margin: 8px 0;
    color: #333;
    font-size: 14px;
}

#cryptomus-corner-login .cryptomus-corner-modal-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@keyframes cryptomus-corner-fade-in {
    from {
        opacity: 0;
        transform: scale(.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    .cryptomus-pricing-cards {
        grid-template-columns: 1fr;
    }
    
    .cryptomus-pricing-header h1 {
        font-size: 32px;
    }
    
    .membership-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .membership-status {
        margin-top: 10px;
    }
    
    .download-history-table {
        font-size: 14px;
    }
    
    .download-history-table th,
    .download-history-table td {
        padding: 8px;
    }
}
