/* African Tokenization Exchange Map Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0052cc;
    --secondary-color: #f7931a;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --dark-bg: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --hover-bg: #334155;
    --gradient-primary: linear-gradient(135deg, #0052cc 0%, #1e40af 100%);
    --gradient-secondary: linear-gradient(135deg, #f7931a 0%, #ea580c 100%);
    --gradient-africa: linear-gradient(135deg, #1e40af 0%, #f7931a 50%, #10b981 100%);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Hero Header */
.hero-header {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    z-index: 1;
}

.african-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(247, 147, 26, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 82, 204, 0.1) 0%, transparent 50%);
    animation: patternFloat 20s ease-in-out infinite;
}

@keyframes patternFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-20px, -10px) scale(1.1); }
    66% { transform: translate(20px, -10px) scale(0.9); }
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(0, 82, 204, 0.2) 0%, 
        rgba(247, 147, 26, 0.1) 50%, 
        rgba(16, 185, 129, 0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1200px;
    padding: 2rem;
    width: 100%;
}

.nav-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-brand .logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-africa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-brand .logo i {
    margin-right: 0.75rem;
    font-size: 2rem;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(0, 82, 204, 0.1);
    border-color: rgba(0, 82, 204, 0.3);
    transform: translateY(-2px);
}

.hero-text {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.title-highlight {
    background: var(--gradient-africa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 82, 204, 0.3);
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 2;
    background: var(--dark-bg);
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Token Map Section */
.token-map-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.map-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 3rem;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.map-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-africa);
}

.africa-map {
    width: 100%;
    height: auto;
    max-height: 800px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.country-group {
    cursor: pointer;
    transition: all 0.3s ease;
}

.country-path {
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.country-group:hover .country-path {
    fill: #f7931a;
    stroke: #ffffff;
    stroke-width: 3;
    filter: drop-shadow(0 4px 8px rgba(247, 147, 26, 0.5));
    transform: translateY(-2px);
}

.country-label {
    pointer-events: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 700;
    letter-spacing: 1px;
}

.token-indicator {
    cursor: pointer;
    filter: drop-shadow(0 0 8px currentColor);
}

.token-symbol {
    pointer-events: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: 800;
}

.floating-token {
    pointer-events: none;
    filter: drop-shadow(0 0 10px currentColor);
}

/* Country Info Panel */
.country-info-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.panel-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.panel-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.panel-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.panel-content {
    min-height: 200px;
}

.placeholder-content {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.placeholder-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.placeholder-content p {
    font-size: 1.2rem;
}

/* Token Statistics Section */
.token-stats-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stat-card.north-africa::before { background: linear-gradient(90deg, #f59e0b, #f97316); }
.stat-card.west-africa::before { background: linear-gradient(90deg, #06b6d4, #0891b2); }
.stat-card.east-africa::before { background: linear-gradient(90deg, #10b981, #059669); }
.stat-card.southern-africa::before { background: linear-gradient(90deg, #ef4444, #dc2626); }

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-header i {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.1);
}

.north-africa .stat-header i { color: #f59e0b; }
.west-africa .stat-header i { color: #06b6d4; }
.east-africa .stat-header i { color: #10b981; }
.southern-africa .stat-header i { color: #ef4444; }

.stat-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-values {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-values .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
}

.stat-values .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-values .value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.2rem;
}

/* Featured Tokens Section */
.featured-tokens-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.tokens-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.token-card.featured {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.token-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-africa);
}

.token-card.featured:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.token-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.token-flag {
    font-size: 2.5rem;
    margin-right: 1rem;
}

.token-info h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.token-symbol {
    color: var(--text-secondary);
    font-weight: 500;
}

.token-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.token-status.active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.token-status i {
    font-size: 0.8rem;
}

.token-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.token-stat {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
}

.token-stat .label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.token-stat .value {
    display: block;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.token-stat .value.positive {
    color: var(--success-color);
}

.token-stat .value.negative {
    color: var(--danger-color);
}

/* Country Modal */
.country-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.country-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-country-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.country-flag {
    font-size: 3rem;
}

.country-details h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.country-details p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

.modal-close:hover {
    color: var(--danger-color);
    background: var(--hover-bg);
}

.modal-body {
    padding: 2rem;
}

.token-overview {
    margin-bottom: 3rem;
}

.token-main-info {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.token-logo {
    width: 80px;
    height: 80px;
    background: var(--gradient-africa);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.token-details h4 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.token-symbol {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.token-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.token-status-badge.active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.token-metrics {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.metric {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.metric:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.metric-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.metric-value {
    display: block;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.4rem;
}

.metric-value.positive {
    color: var(--success-color);
}

.metric-value.negative {
    color: var(--danger-color);
}

.token-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
}

.action-btn.primary {
    background: var(--gradient-primary);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 82, 204, 0.3);
}

.action-btn.secondary {
    background: var(--hover-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.action-btn.secondary:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.recent-activity {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.recent-activity h5 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.activity-info {
    flex: 1;
}

.activity-type {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.activity-amount {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.activity-time {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 4000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: var(--text-primary);
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.loading-spinner p {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .navbar {
        padding: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .hero-stats {
        gap: 1rem;
    }
    
    .map-container {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .map-container {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tokens-showcase {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .token-main-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .metric-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .token-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 2rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .map-container {
        padding: 0.5rem;
        border-radius: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .country-info-panel {
        padding: 1.5rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .token-card.featured {
        padding: 1.5rem;
    }
    
    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }
}

/* Animations for special effects */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(247, 147, 26, 0.5); }
    50% { box-shadow: 0 0 30px rgba(247, 147, 26, 0.8); }
}

.country-group:hover .token-indicator {
    animation: pulse 1s ease-in-out infinite;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--hover-bg);
}