/* Coin Club Pro - Public/Frontend Styles */

:root {
    --ccp-primary: #07594b;
    --ccp-primary-light: #0a7d6a;
    --ccp-primary-dark: #054338;
    --ccp-secondary: #667eea;
    --ccp-success: #4caf50;
    --ccp-warning: #ff9800;
    --ccp-error: #f44336;
    --ccp-gold: #FFD700;
    --ccp-radius: 12px;
    --ccp-shadow: 0 4px 20px rgba(0,0,0,0.1);
    --ccp-transition: 0.3s ease;
}

/* ===== NOTIFICATION SYSTEM ===== */
.ccp-header-notification {
    position: relative;
    display: inline-flex;
}

.ccp-notif-trigger {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all var(--ccp-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ccp-notif-trigger:hover {
    background: rgba(118, 75, 162, 0.1);
}

.ccp-notif-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    transition: stroke var(--ccp-transition);
}

.ccp-notif-trigger:hover .ccp-notif-icon {
    stroke: var(--ccp-primary);
}

.ccp-notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #FF6B6B, #EE5A5A);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 8px rgba(238, 90, 90, 0.4);
    animation: ccp-pulse 2s infinite;
}

@keyframes ccp-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Notification Dropdown */
.ccp-notification-dropdown {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 380px;
    max-width: 95vw;
    background: white;
    border-radius: var(--ccp-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 99999;
    overflow: hidden;
    max-height: 500px;
    display: flex;
    flex-direction: column;
}

.ccp-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #07594b, #0a7d6a);
    color: white;
}

.ccp-notif-title {
    font-size: 16px;
    font-weight: 600;
}

.ccp-mark-all-read {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all var(--ccp-transition);
}

.ccp-mark-all-read:hover {
    background: rgba(255,255,255,0.35);
    transform: scale(1.05);
}

.ccp-notif-list {
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
}

.ccp-notif-item {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background var(--ccp-transition);
}

.ccp-notif-item:hover {
    background: #f9f9f9;
}

.ccp-notif-item.unread {
    background: rgba(7, 89, 75, 0.05);
}

.ccp-notif-item.unread::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--ccp-primary);
    border-radius: 0 4px 4px 0;
}

.ccp-notif-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ccp-notif-icon-wrap.success { background: rgba(76, 175, 80, 0.1); color: var(--ccp-success); }
.ccp-notif-icon-wrap.warning { background: rgba(255, 152, 0, 0.1); color: var(--ccp-warning); }
.ccp-notif-icon-wrap.error { background: rgba(244, 67, 54, 0.1); color: var(--ccp-error); }
.ccp-notif-icon-wrap.info { background: rgba(7, 89, 75, 0.1); color: var(--ccp-primary); }
.ccp-notif-icon-wrap.special { background: rgba(255, 215, 0, 0.15); color: #FFA500; }

.ccp-notif-content {
    flex: 1;
    min-width: 0;
}

.ccp-notif-item-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
}

.ccp-notif-item-message {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ccp-notif-item-time {
    font-size: 11px;
    color: #999;
    margin-top: 6px;
}

.ccp-notif-view-all {
    display: block;
    text-align: center;
    padding: 14px;
    color: var(--ccp-primary);
    text-decoration: none;
    font-weight: 500;
    border-top: 1px solid #f0f0f0;
    transition: background var(--ccp-transition);
}

.ccp-notif-view-all:hover {
    background: #f9f9f9;
}

.ccp-notif-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

/* ===== USER POINTS BADGE ===== */
.ccp-user-points {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--ccp-primary), var(--ccp-secondary));
    color: white;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--ccp-transition);
}

.ccp-user-points:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.4);
    color: white;
}

.ccp-coin-icon {
    font-size: 18px;
}

/* ===== ACCOUNT PAGES ===== */
.ccp-account-page {
    max-width: 100%;
}

.ccp-page-header {
    margin-bottom: 30px;
}

.ccp-page-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ccp-page-subtitle {
    color: #666;
    font-size: 15px;
}

/* Stats Cards */
.ccp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ccp-stat-card {
    background: white;
    border-radius: var(--ccp-radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--ccp-shadow);
    transition: transform var(--ccp-transition);
}

.ccp-stat-card:hover {
    transform: translateY(-4px);
}

.ccp-stat-card.primary {
    background: linear-gradient(135deg, var(--ccp-primary), var(--ccp-secondary));
    color: white;
}

.ccp-stat-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.ccp-stat-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
}

.ccp-stat-label {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 8px;
}

/* Section */
.ccp-section {
    background: white;
    border-radius: var(--ccp-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--ccp-shadow);
}

.ccp-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

/* History Table */
.ccp-history-table {
    width: 100%;
    border-collapse: collapse;
}

.ccp-history-table th,
.ccp-history-table td {
    padding: 14px 16px;
    text-align: right;
    border-bottom: 1px solid #f0f0f0;
}

.ccp-history-table th {
    font-weight: 600;
    color: #666;
    font-size: 13px;
    background: #fafafa;
}

.ccp-history-table tbody tr:hover {
    background: #f9f9f9;
}

.ccp-points-change {
    font-weight: 700;
    font-size: 15px;
}

.ccp-points-change.positive { color: var(--ccp-success); }
.ccp-points-change.negative { color: var(--ccp-error); }

/* Convert Form */
.ccp-convert-form {
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.05), rgba(102, 126, 234, 0.05));
    border-radius: var(--ccp-radius);
    padding: 24px;
    border: 2px dashed rgba(118, 75, 162, 0.3);
}

.ccp-convert-info {
    margin-bottom: 16px;
    color: #666;
}

.ccp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all var(--ccp-transition);
    text-decoration: none;
}

.ccp-btn-primary {
    background: linear-gradient(135deg, var(--ccp-primary), var(--ccp-secondary));
    color: white;
}

.ccp-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.4);
    color: white;
}

/* Referral Section */
.ccp-referral-link-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ccp-referral-link {
    flex: 1;
    font-family: monospace;
    font-size: 14px;
    direction: ltr;
    text-align: left;
    word-break: break-all;
    color: var(--ccp-primary);
}

.ccp-copy-btn {
    padding: 10px 20px;
    background: var(--ccp-primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--ccp-transition);
}

.ccp-copy-btn:hover {
    background: var(--ccp-primary-light);
}

.ccp-copy-btn.copied {
    background: var(--ccp-success);
}

/* Referral Stats */
.ccp-referral-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.ccp-referral-stat {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.ccp-referral-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--ccp-primary);
}

.ccp-referral-stat-label {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

/* ===== FORTUNE WHEEL ===== */
.ccp-wheel-container {
    text-align: center;
    padding: 20px;
}

.ccp-wheel-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.ccp-wheel-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ccp-wheel-info-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--ccp-primary);
}

.ccp-wheel-info-label {
    font-size: 13px;
    color: #666;
}

.ccp-wheel-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 0 auto 30px;
}

.ccp-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    transition: transform 5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    box-shadow: 0 0 30px rgba(0,0,0,0.2), inset 0 0 20px rgba(0,0,0,0.1);
}

.ccp-wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 35px solid var(--ccp-primary);
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.3));
    z-index: 10;
}

.ccp-wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--ccp-gold), #FFA500);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 5;
}

.ccp-spin-btn {
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--ccp-primary), var(--ccp-secondary));
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all var(--ccp-transition);
    box-shadow: 0 4px 20px rgba(118, 75, 162, 0.4);
}

.ccp-spin-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(118, 75, 162, 0.5);
}

.ccp-spin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ccp-spin-btn.spinning {
    animation: ccp-btn-pulse 1s infinite;
}

@keyframes ccp-btn-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ccp-wheel-cost {
    margin-top: 16px;
    color: #666;
    font-size: 14px;
}

/* Wheel Result Modal */
.ccp-wheel-result {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--ccp-transition);
}

.ccp-wheel-result.show {
    opacity: 1;
    visibility: visible;
}

.ccp-wheel-result-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    transform: scale(0.8);
    transition: transform var(--ccp-transition);
}

.ccp-wheel-result.show .ccp-wheel-result-content {
    transform: scale(1);
}

.ccp-wheel-result-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.ccp-wheel-result-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.ccp-wheel-result-prize {
    font-size: 32px;
    font-weight: 800;
    color: var(--ccp-primary);
    margin-bottom: 20px;
}

.ccp-wheel-result-balance {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}

/* Wheel Prizes List */
.ccp-wheel-prizes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 30px;
}

.ccp-wheel-prize-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    font-size: 14px;
}

.ccp-wheel-prize-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* History Widget */
.ccp-history-widget {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ccp-history-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: #f9f9f9;
    border-radius: 8px;
}

.ccp-history-item.positive {
    border-right: 4px solid var(--ccp-success);
}

.ccp-history-item.negative {
    border-right: 4px solid var(--ccp-error);
}

.ccp-history-points {
    font-size: 18px;
    font-weight: 700;
    min-width: 80px;
}

.ccp-history-item.positive .ccp-history-points { color: var(--ccp-success); }
.ccp-history-item.negative .ccp-history-points { color: var(--ccp-error); }

.ccp-history-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ccp-history-reason {
    font-weight: 500;
    color: #333;
}

.ccp-history-date {
    font-size: 12px;
    color: #999;
}

/* Product Points Message */
.ccp-product-points {
    margin: 15px 0;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.08), rgba(102, 126, 234, 0.08));
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

/* Notifications Page */
.ccp-notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ccp-notification-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: var(--ccp-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all var(--ccp-transition);
    position: relative;
}

.ccp-notification-card:hover {
    box-shadow: var(--ccp-shadow);
}

.ccp-notification-card.unread {
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.03), rgba(102, 126, 234, 0.03));
    border-right: 4px solid var(--ccp-primary);
}

.ccp-notification-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.ccp-notification-icon.success { background: rgba(76, 175, 80, 0.1); }
.ccp-notification-icon.warning { background: rgba(255, 152, 0, 0.1); }
.ccp-notification-icon.info { background: rgba(118, 75, 162, 0.1); }
.ccp-notification-icon.error { background: rgba(244, 67, 54, 0.1); }

.ccp-notification-body {
    flex: 1;
}

.ccp-notification-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    font-size: 16px;
}

.ccp-notification-message {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.ccp-notification-time {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

.ccp-no-notifications {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.ccp-no-notifications-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .ccp-notification-dropdown {
        width: 95vw;
        top: 50px;
    }
    
    .ccp-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ccp-wheel-wrapper {
        width: 280px;
        height: 280px;
    }
    
    .ccp-wheel-info {
        flex-direction: column;
        gap: 16px;
    }
    
    .ccp-referral-stats {
        grid-template-columns: 1fr;
    }
    
    .ccp-referral-link-box {
        flex-direction: column;
    }
    
    .ccp-copy-btn {
        width: 100%;
    }
}

/* ===== GUEST NOTIFICATION POPUP ===== */
.ccp-guest-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(4px);
}

.ccp-guest-popup-content {
    background: white;
    padding: 32px;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: ccpPopupIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

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

.ccp-guest-popup-close {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #f0f0f0;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
}

.ccp-guest-popup-close:hover {
    background: #e0e0e0;
}

.ccp-guest-popup-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
}

.ccp-guest-popup-icon svg {
    width: 100%;
    height: 100%;
}

.ccp-guest-popup-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #333;
}

.ccp-guest-popup-message {
    font-size: 15px;
    color: #666;
    margin: 0 0 20px;
    line-height: 1.6;
}

.ccp-guest-popup-link {
    display: inline-block;
    padding: 12px 32px;
    background: #07594b;
    color: white !important;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.2s;
}

.ccp-guest-popup-link:hover {
    background: #064a3e;
    transform: translateY(-2px);
}

/* ===== GUEST TOAST NOTIFICATION ===== */
.ccp-guest-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    max-width: 380px;
    z-index: 99998;
    animation: ccpToastIn 0.4s ease;
    border-right: 4px solid #07594b;
}

@keyframes ccpToastIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ccp-guest-toast.hiding {
    animation: ccpToastOut 0.3s ease forwards;
}

@keyframes ccpToastOut {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.ccp-toast-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.ccp-toast-icon svg {
    width: 100%;
    height: 100%;
}

.ccp-toast-content {
    flex: 1;
}

.ccp-toast-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.ccp-toast-message {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.ccp-toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.ccp-toast-close:hover {
    color: #666;
}

/* Toast types */
.ccp-guest-toast.type-success {
    border-right-color: #4CAF50;
}

.ccp-guest-toast.type-warning {
    border-right-color: #FF9800;
}

.ccp-guest-toast.type-error {
    border-right-color: #F44336;
}

.ccp-guest-toast.type-special {
    border-right-color: #FFD700;
}

@media (max-width: 480px) {
    .ccp-guest-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
    
    .ccp-guest-popup-content {
        padding: 24px;
    }
}
