/* Modern CSS for Krypton Cryptocurrency Pages */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
.hero-background, .nodes-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(0, 229, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(0, 255, 127, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundPulse 10s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Hero Section Styles */
.hero-section {
    text-align: center;
    padding: 80px 0;
    position: relative;
}

.logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.5);
    transition: all 0.3s ease;
    animation: logoFloat 6s ease-in-out infinite;
}

.logo:hover {
    transform: scale(1.1);
    box-shadow: 0 0 60px rgba(0, 229, 255, 0.8);
}

.logo-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #00e5ff, #ff00ff, #00ff80, #00e5ff);
    opacity: 0.3;
    z-index: -1;
    animation: rotate 10s linear infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #00e5ff, #00ff80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.5)); }
    to { filter: drop-shadow(0 0 30px rgba(0, 255, 127, 0.8)); }
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.stat-value {
    font-size: 2rem;
    animation: bounce 2s infinite;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Button Styles */
.buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.button:hover::before {
    left: 100%;
}

.button.primary {
    background: linear-gradient(135deg, #00e5ff, #00ff80);
    color: #000;
    box-shadow: 0 5px 20px rgba(0, 229, 255, 0.3);
}

.button.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.5);
}

.button.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 2px solid rgba(0, 229, 255, 0.3);
    backdrop-filter: blur(10px);
}

.button.secondary:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: #00e5ff;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 229, 255, 0.2);
}

.button-icon {
    font-size: 1.2em;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

/* Features Section */
.features-section {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00e5ff, #00ff80, #ff00ff);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: #00e5ff;
    box-shadow: 0 20px 40px rgba(0, 229, 255, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #00e5ff;
}

.feature-card p {
    opacity: 0.8;
    line-height: 1.6;
}

/* Network Statistics */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #00e5ff, #00ff80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.8;
}

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

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00e5ff, #00ff80);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: #00e5ff;
    box-shadow: 0 15px 30px rgba(0, 229, 255, 0.2);
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #00e5ff;
    display: block;
    margin-bottom: 10px;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    opacity: 0.3;
}

/* Table Styles */
.table-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(0, 229, 255, 0.2);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

.nodes-table,
table {
    width: 100%;
    border-collapse: collapse;
}

.nodes-table thead,
table thead {
    background: rgba(0, 229, 255, 0.1);
}

.nodes-table th,
table th {
    padding: 20px 15px;
    text-align: left;
    font-weight: 600;
    color: #00e5ff;
    border-bottom: 2px solid rgba(0, 229, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.nodes-table td,
table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: middle;
}

.node-row:hover,
tr:hover {
    background: rgba(0, 229, 255, 0.05);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #888;
    font-style: italic;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-online {
    background: #00ff80;
    box-shadow: 0 0 10px rgba(0, 255, 127, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 127, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 255, 127, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 127, 0); }
}

/* Ping Status Colors */
.ping-good {
    color: #00ff80;
    font-weight: 600;
}

.ping-medium {
    color: #ffaa00;
    font-weight: 600;
}

.ping-bad {
    color: #ff4444;
    font-weight: 600;
}

/* Version Badge */
.version-badge {
    background: rgba(0, 229, 255, 0.2);
    color: #00e5ff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0, 229, 255, 0.3);
}

/* Sync Status */
.sync-status {
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.synced {
    background: rgba(0, 255, 127, 0.2);
    color: #00ff80;
    border: 1px solid rgba(0, 255, 127, 0.3);
}

.syncing {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
    border: 1px solid rgba(255, 170, 0, 0.3);
}

/* Additional Table Styling */
.node-id {
    color: #888;
    font-size: 0.8rem;
}

.connection-time {
    color: #888;
    font-size: 0.8rem;
}

.services-cell {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #00e5ff;
}

/* Refresh Button */
.refresh-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #00e5ff, #00ff80);
    color: #000;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 229, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.refresh-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.5);
}

.refresh-btn:active {
    transform: scale(0.95);
}

/* Last Update */
.last-update {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-top: 20px;
    font-style: italic;
}

/* Error Styles */
.error-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.error-header {
    text-align: center;
    margin-bottom: 30px;
}

.error-title {
    font-size: 2.5rem;
    color: #ff4444;
    margin-bottom: 10px;
}

.error-message {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.error-message h3 {
    color: #ff4444;
    margin-bottom: 10px;
}

.config-help {
    margin: 30px 0;
}

.config-help h3 {
    color: #00e5ff;
    margin-bottom: 15px;
}

.config-example {
    background: #1a1a1a;
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
}

.config-example .comment {
    color: #888;
}

.config-example .highlight {
    color: #00e5ff;
    font-weight: 600;
}

.tip-box {
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
    text-align: center;
}

.tip-box code {
    background: #333;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(0, 229, 255, 0.2);
    padding: 40px 0;
    margin-top: 80px;
    backdrop-filter: blur(10px);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #00e5ff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .network-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-card .stat-value {
        font-size: 2rem;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .nodes-table,
    table {
        min-width: 800px;
    }
    
    .refresh-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .config-example {
        font-size: 0.8rem;
        padding: 15px;
    }
    
    .error-container {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .error-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .network-stats {
        grid-template-columns: 1fr;
    }
    
    .nodes-table th,
    .nodes-table td,
    table th,
    table td {
        padding: 10px 8px;
        font-size: 0.8rem;
    }
    
    .feature-card {
        padding: 30px 20px;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00e5ff, #00ff80);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00b8cc, #00cc66);
}

/* Loading Animation */
@keyframes loading {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    animation: loading 1s linear infinite;
}

/* Hover Effects for Interactive Elements */
a, button, .button {
    cursor: pointer;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
.button:focus {
    outline: 2px solid #00e5ff;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .refresh-btn,
    .hero-background,
    .nodes-background {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}

/* Header Navigation Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-section .logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00e5ff, #00ff80);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: #000;
    box-shadow: none;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #00e5ff, #00ff80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: rgba(224, 224, 224, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: #00e5ff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #00e5ff, #00ff80);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .menu-toggle {
        display: block;
    }

    .nav-container {
        padding: 0 1rem;
    }
}

/* Padding pour compenser le header fixe */
body {
    padding-top: 80px;
}

/* Focus Styles for Accessibility */
.nav-link:focus,
.menu-toggle:focus {
    outline: 2px solid #00e5ff;
    outline-offset: 2px;
}
