/* FMC Frontend Styles */

:root {
    --fmc-primary: #2563eb;
    --fmc-secondary: #7c3aed;
    --fmc-success: #16a34a;
    --fmc-danger: #dc2626;
    --fmc-warning: #f59e0b;
    --fmc-gray-50: #f9fafb;
    --fmc-gray-100: #f3f4f6;
    --fmc-gray-200: #e5e7eb;
    --fmc-gray-600: #4b5563;
    --fmc-gray-900: #111827;
}

.fmc-dashboard, .fmc-leaderboard, .fmc-achievements, .fmc-polls, .fmc-nft-wallet {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.fmc-container {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.fmc-section-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--fmc-gray-900);
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--fmc-primary);
}

.fmc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.fmc-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.fmc-stat-icon {
    font-size: 40px;
}

.fmc-stat-number {
    font-size: 28px;
    font-weight: bold;
    margin: 5px 0;
}

.fmc-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.fmc-leaderboard-subtitle {
    color: #6b7280;
    margin-top: -10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.fmc-leaderboard-empty {
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    margin-top: 20px;
}

.fmc-leaderboard-empty p {
    color: #6b7280;
    margin: 10px 0;
}

.fmc-leaderboard-empty a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 600;
}

.fmc-leaderboard-empty a:hover {
    color: #1d4ed8;
}

.fmc-verified-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    font-size: 12px;
    margin-left: 6px;
    vertical-align: middle;
}

.fmc-leaderboard-table th {
    background: #2563eb;
    color: #fff;
    padding: 12px;
    text-align: left;
}

.fmc-leaderboard-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.fmc-leaderboard-table tr:hover {
    background: #f8f9fa;
}

.fmc-rank-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #2563eb;
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.fmc-achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.fmc-achievement-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.fmc-achievement-card.earned {
    border-color: #16a34a;
    box-shadow: 0 4px 6px rgba(22,163,74,0.2);
}

.fmc-achievement-card.locked {
    opacity: 0.6;
}

.fmc-achievement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.fmc-achievement-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.fmc-achievement-progress {
    margin: 15px 0;
}

.fmc-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.fmc-progress-fill {
    height: 100%;
    background: linear-gradient(to right, #2563eb, #16a34a);
    transition: width 0.3s ease;
}

.fmc-poll-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.fmc-poll-form label.fmc-poll-option {
    display: block;
    padding: 12px;
    margin: 8px 0;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.fmc-poll-form label.fmc-poll-option:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.fmc-poll-form input[type="radio"] {
    margin-right: 10px;
}

.fmc-vote-btn, .fmc-submit-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
}

.fmc-vote-btn:hover, .fmc-submit-btn:hover {
    background: #1d4ed8;
}

.fmc-poll-option-bar {
    height: 30px;
    background: #e5e7eb;
    border-radius: 6px;
    margin: 8px 0;
    overflow: hidden;
}

.fmc-poll-option-fill {
    height: 100%;
    background: linear-gradient(to right, #2563eb, #7c3aed);
    transition: width 0.3s ease;
}

.fmc-nft-verified {
    background: #f0fdf4;
    border: 2px solid #16a34a;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.fmc-wallet-form-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.fmc-nft-description {
    text-align: center;
    font-size: 16px;
    color: #4b5563;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* MetaMask Section */
.fmc-metamask-section {
    text-align: center;
    padding: 20px;
}

.fmc-btn-metamask {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 40px;
    background: linear-gradient(135deg, #f6851b 0%, #e2761b 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(246, 133, 27, 0.4);
    min-width: 250px;
}

.fmc-btn-metamask:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(246, 133, 27, 0.5);
    background: linear-gradient(135deg, #e2761b 0%, #cd6116 100%);
}

.fmc-btn-metamask:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(246, 133, 27, 0.4);
}

.fmc-btn-metamask:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(246, 133, 27, 0.2);
}

.fmc-metamask-icon {
    font-size: 28px;
    line-height: 1;
}

.fmc-btn-text {
    font-size: 18px;
}

.fmc-metamask-status {
    margin-top: 20px;
    padding: 15px;
    font-size: 15px;
    color: #4b5563;
    border-radius: 8px;
    line-height: 1.6;
    display: none;
}

.fmc-metamask-status.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 2px solid #16a34a;
    font-weight: 600;
    display: block;
}

.fmc-metamask-status.error {
    background: #fef2f2;
    color: #dc2626;
    border: 2px solid #dc2626;
    display: block;
}

/* Divider */
.fmc-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0;
    color: var(--fmc-gray-600);
}

.fmc-divider::before,
.fmc-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--fmc-gray-200);
}

.fmc-divider span {
    padding: 0 15px;
    font-size: 14px;
    font-weight: 500;
}

.fmc-form-group {
    margin-bottom: 20px;
}

.fmc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.fmc-form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 16px;
}

.fmc-form-group small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 13px;
}

.fmc-message {
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
}

.fmc-message.success {
    background: #f0fdf4;
    border: 1px solid #16a34a;
    color: #16a34a;
}

.fmc-message.error {
    background: #fef2f2;
    border: 1px solid #dc2626;
    color: #dc2626;
}

.fmc-profile-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.fmc-profile-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.fmc-profile-avatar img {
    border-radius: 50%;
}

.fmc-nft-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 24px;
}

.fmc-profile-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.fmc-profile-stat {
    text-align: center;
}

.fmc-stat-label {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 5px;
}

.fmc-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #2563eb;
}

/* Responsive */
@media (max-width: 768px) {
    .fmc-stats-grid, .fmc-achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .fmc-leaderboard-table {
        font-size: 14px;
    }
    
    .fmc-leaderboard-table th,
    .fmc-leaderboard-table td {
        padding: 8px;
    }
    
    .fmc-container {
        padding: 20px;
    }
    
    .fmc-profile-stats {
        flex-direction: column;
    }
}

/* Animations */
@keyframes fmc-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fmc-fade-in {
    animation: fmc-fadeIn 0.3s ease-out;
}

@keyframes fmc-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.fmc-pulse {
    animation: fmc-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Loading State */
.fmc-loading {
    text-align: center;
    padding: 40px;
}

.fmc-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--fmc-gray-200);
    border-top-color: var(--fmc-primary);
    border-radius: 50%;
    animation: fmc-spin 0.8s linear infinite;
}

@keyframes fmc-spin {
    to { transform: rotate(360deg); }
}

/* Credits Badge */
.fmc-credits-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.fmc-credits-icon {
    font-size: 16px;
}

/* Hover Effects */
.fmc-hover-lift {
    transition: transform 0.2s, box-shadow 0.2s;
}

.fmc-hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Status Indicators */
.fmc-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.fmc-status-active {
    background: var(--fmc-success);
}

.fmc-status-inactive {
    background: var(--fmc-gray-600);
}

.fmc-status-pending {
    background: var(--fmc-warning);
}

/* User Avatar */
.fmc-avatar {
    border-radius: 50%;
    overflow: hidden;
    display: inline-block;
}

.fmc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fmc-avatar-sm {
    width: 32px;
    height: 32px;
}

.fmc-avatar-md {
    width: 48px;
    height: 48px;
}

.fmc-avatar-lg {
    width: 80px;
    height: 80px;
}

/* Text Utilities */
.fmc-text-muted {
    color: var(--fmc-gray-600);
}

.fmc-text-primary {
    color: var(--fmc-primary);
}

.fmc-text-success {
    color: var(--fmc-success);
}

.fmc-text-danger {
    color: var(--fmc-danger);
}

.fmc-text-center {
    text-align: center;
}

/* Spacing Utilities */
.fmc-mt-1 { margin-top: 0.5rem; }
.fmc-mt-2 { margin-top: 1rem; }
.fmc-mt-3 { margin-top: 1.5rem; }
.fmc-mt-4 { margin-top: 2rem; }

.fmc-mb-1 { margin-bottom: 0.5rem; }
.fmc-mb-2 { margin-bottom: 1rem; }
.fmc-mb-3 { margin-bottom: 1.5rem; }
.fmc-mb-4 { margin-bottom: 2rem; }

.fmc-p-1 { padding: 0.5rem; }
.fmc-p-2 { padding: 1rem; }
.fmc-p-3 { padding: 1.5rem; }
.fmc-p-4 { padding: 2rem; }

/* Gradient Backgrounds */
.fmc-gradient-primary {
    background: linear-gradient(135deg, var(--fmc-primary) 0%, var(--fmc-secondary) 100%);
}

.fmc-gradient-success {
    background: linear-gradient(135deg, #16a34a 0%, #0891b2 100%);
}

.fmc-gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
