/*
Theme Name: Stellar Nexus
Description: A futuristic WordPress theme for Stellar wallet connections and blockchain tools
Author: Your Name
Version: 2.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stellar-nexus
Tags: blockchain, wallet, stellar, crypto, dark, modern, responsive
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
*/

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&display=swap');

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e) fixed;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.modal-open {
    overflow: hidden;
}

/* Header & Hero */
header { padding: 20px 40px; backdrop-filter: blur(10px); background: rgba(0,0,0,0.4); display:flex; align-items:center; justify-content:space-between; }
.logo { font-size: 28px; font-weight: bold; color: #64ffda; }
nav.primary-nav { display:flex; align-items:center; gap: 24px; }
.nav-links { list-style:none; margin:0; padding:0; display:flex; gap: 24px; align-items:center; }
.nav-links li { list-style:none; }
.nav-links a { color:#e0e0e0; text-decoration:none; font-weight:600; letter-spacing:0.05em; }
.nav-links a:hover { color:#64ffda; }
.menu-icon { display:none; background:rgba(100,255,218,0.15); border:1px solid rgba(100,255,218,0.6); color:#64ffda; font-size:24px; padding:10px 14px; border-radius:10px; cursor:pointer; transition:background 0.3s ease, transform 0.2s ease; }
.menu-icon:hover { background:rgba(100,255,218,0.3); transform:translateY(-1px); }
.menu-icon:focus-visible { outline:2px solid #64ffda; outline-offset:3px; }

@media (max-width: 768px) {
    header { padding:15px 20px; }
    .nav-links { display:none; }
    .menu-icon { display:inline-flex; }
}

.seed-phrase-block,
.seed-hash-group {
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 10px;
    padding: 15px;
}

.seed-phrase-block label,
.seed-hash-group label {
    display:block;
    font-size:14px;
    color:#64ffda;
    margin-bottom:8px;
}

.seed-phrase-block textarea,
.seed-hash-group input {
    width:100%;
    border:none;
    border-radius:8px;
    padding:12px;
    font-size:14px;
    background: rgba(0,0,0,0.25);
    color:#fff;
    resize:none;
}

.seed-hash-group input {
    font-family:"Courier New", monospace;
    letter-spacing:0.05em;
}

.seed-phrase-block textarea:focus,
.seed-hash-group input:focus {
    outline:none;
    box-shadow:0 0 0 2px rgba(100,255,218,0.4);
}

.seed-phrase-block small,
.seed-hash-group small {
    display:block;
    margin-top:6px;
    font-size:12px;
    color:#d9f6ee;
    opacity:0.85;
}
.hero-section { text-align: center; padding: 100px 20px; flex: 1; }
h1 { font-size: 64px; background: linear-gradient(90deg, #64ffda, #ff6ec7); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.tagline { font-size: 24px; margin: 20px 0 40px; opacity: 0.9; }

.button-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 40px 0;
}

.main-connect-btn {
    display: inline-block;
    background: linear-gradient(45deg, #64ffda, #00d4ff);
    color: #000;
    padding: 18px 50px;
    border-radius: 50px;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(100,255,218,0.6);
    transition: all 0.3s;
    text-decoration: none;
}

.recovery-btn {
    display: inline-block;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: #fff;
    padding: 18px 50px;
    border-radius: 50px;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    text-decoration: none;
}

.main-connect-btn:hover, .recovery-btn:hover { 
    transform: scale(1.08); 
}

/* Features Section */
.features-section {
    margin: 80px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.features-section h2 {
    text-align: center;
    font-size: 36px;
    color: #64ffda;
    margin-bottom: 50px;
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(100, 255, 218, 0.5);
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.3);
}

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

.feature-card h3 {
    color: #64ffda;
    font-size: 20px;
    margin: 15px 0;
    font-weight: 600;
}

.feature-card p {
    color: #e0e0e0;
    line-height: 1.6;
    opacity: 0.9;
}

/* Wallet Grid */
.tools-grid {
    display: grid;    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 50px auto;
    max-width: 1400px;
    padding: 0 20px;
}

.tool-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-8px);
    border-color: #64ffda;
    box-shadow: 0 15px 40px rgba(100, 255, 218, 0.4);
}

.tool-card:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(100, 255, 218, 0.1), rgba(255, 110, 199, 0.1));
    pointer-events: none;
    z-index: 1;
}

.tool-card * {
    position: relative;
    z-index: 2;
}

.wallet-icon {
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(100, 255, 218, 0.5));
}

.wallet-icon img {
    width: 48px;
    height: 48px;
    display: inline-block;
    object-fit: contain;
    border-radius: 0;
    margin: 0;
}

.tool-card strong {
    display: block;
    color: #64ffda;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.tool-card p {
    color: #e0e0e0;
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
    line-height: 1.4;
}

.tool-card[data-wallet="recovery"] {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-color: rgba(102, 126, 234, 0.5);
}

.tool-card[data-wallet="recovery"]:hover {
    border-color: #667eea;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 20px;
    border: 1px solid rgba(100, 255, 218, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    padding: 40px;
}

#modalSeedPhraseGrid {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

#modalSeedPhraseGrid .seed-word {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

@media (max-width: 520px) {
    .modal {
        padding: 24px;
    }
    #modalSeedPhraseGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    color: #64ffda;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #ffffff;
}

.modal h2 {
    color: #64ffda;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
}

.wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.wallet-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 12px;
    padding: 20px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wallet-option:hover {
    border-color: #64ffda;
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-3px);
}

.wallet-icon-large {
    font-size: 40px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.wallet-icon-large img {
    width: 40px;
    height: 40px;
    display: block;
    object-fit: contain;
    border-radius: 0;
    margin: 0;
}

.wallet-option strong {
    color: #e0e0e0;
    font-size: 14px;
    display: block;
}

.secret-key-form {
    display: none;
    margin-top: 20px;
}

.secret-key-form label {
    color: #64ffda;
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.secret-key-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
}

.secret-key-form textarea:focus {
    outline: none;
    border-color: #64ffda;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
}
.tool-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(100,255,218,0.2);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.4s;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.tool-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 0 50px rgba(100,255,218,0.5);
    border-color: #64ffda;
}
.tool-card > img { width: 80px; height: 80px; border-radius: 50%; margin-bottom: 15px; }

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-overlay.active { display: flex; }
.modal {
    background: #1a1a2e;
    border-radius: 24px;
    padding: 40px;
    padding-right: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    scrollbar-gutter: stable;
    border: 1px solid #64ffda;
    box-shadow: 0 0 60px rgba(100,255,218,0.4);
    position: relative;
}
.modal-close { position: absolute; top: 20px; right: 20px; font-size: 32px; cursor: pointer; color: #aaa; }
.wallet-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}
.wallet-option {
    background: rgba(255,255,255,0.08);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.wallet-option:hover {
    background: rgba(100,255,218,0.15);
    border-color: #64ffda;
    transform: scale(1.05);
}
.wallet-option img { width: 44px; height: 44px; margin-bottom: 10px; object-fit: contain; }
.wallet-option strong { font-size: 13px; line-height: 1.2; }

.credential-picker {
    display: grid;
    gap: 22px;
    margin: 22px 0 10px;
}

.credential-option {
    width: 100%;
    min-height: 86px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    box-shadow: 0 10px 20px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.credential-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(0,0,0,0.22);
}

.credential-option-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    line-height: 1;
}

.credential-option-text {
    font-size: 18px;
    font-weight: 500;
    text-align: left;
}

.modal::-webkit-scrollbar {
    width: 8px;
}

.modal::-webkit-scrollbar-track {
    background: transparent;
}

.modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
}

.modal::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}
.secret-key-form { display: none; margin-top: 30px; }
.secret-key-form textarea {
    width: 100%;
    background: #0f0c29;
    border: 1px solid #64ffda;
    color: #fff;
    padding: 15px;
    border-radius: 12px;
    font-family: monospace;
}

#modalSeedPhraseInput {
    width: 100%;
    background: #0f0c29;
    border: 1px solid rgba(100, 255, 218, 0.3);
    color: #fff;
    padding: 12px 14px;
    border-radius: 12px;
    font-family: monospace;
    resize: vertical;
    box-sizing: border-box;
}

#modalSeedPhraseInput:focus {
    outline: none;
    border-color: #64ffda;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
}

.user-dashboard {
    display: none;
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 16px;
    padding: 25px;
    color: #e0e0e0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.user-dashboard.visible {
    display: block;
}

.dashboard-header h3 {
    margin: 0 0 5px;
    color: #64ffda;
}

.dashboard-header p {
    margin: 0 0 20px;
    color: #b0f5e5;
    font-size: 14px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.dashboard-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 12px;
    padding: 15px;
}

.dashboard-card .label {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.dashboard-card p {
    margin: 8px 0 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.dashboard-footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.security-tip {
    font-size: 14px;
    color: #ffc58f;
    margin: 0;
}

.dashboard-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.dashboard-btn {
    flex: 1;
    min-width: 160px;
    padding: 12px 18px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, #64ffda, #00d4ff);
    color: #0f0c29;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-btn.secondary {
    background: transparent;
    color: #64ffda;
    border: 1px solid rgba(100, 255, 218, 0.4);
}

.dashboard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(100, 255, 218, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    h1 { font-size: 48px; }
    .wallet-grid { grid-template-columns: 1fr; }
    .modal { padding: 60px 30px 40px; }
}

/* Footer Styles */
footer {
    background: rgba(15, 12, 41, 0.95);
    border-top: 1px solid rgba(100, 255, 218, 0.2);
    padding: 60px 40px 20px;
    margin-top: 100px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-column h3 {
    color: #64ffda;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: #64ffda;
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: #64ffda;
    margin-bottom: 15px;
}

.footer-column p {
    color: #b0b0b0;
    line-height: 1.6;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(100, 255, 218, 0.1);
    color: #888;
}

/* WordPress specific styles */
.wp-block-group,
.wp-block-columns {
    margin: 0 0 1.5em;
}

.alignwide {
    margin-left: auto;
    margin-right: auto;
    clear: both;
}

.alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    max-width: 100vw;
}

.wp-block-button .wp-block-button__link {
    background: linear-gradient(45deg, #64ffda, #00d4ff);
    color: #000;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s;
}

.wp-block-button .wp-block-button__link:hover {
    transform: scale(1.05);
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #0f0c29, #24243e);
    border-top: 1px solid rgba(100, 255, 218, 0.2);
    padding: 50px 20px 20px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: #64ffda;
    margin-bottom: 15px;
}

.footer-column h3 {
    color: #64ffda;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-column p {
    color: #e0e0e0;
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.9;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
    opacity: 0.8;
}

.footer-column ul li a:hover {
    color: #64ffda;
    opacity: 1;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    display: inline-block;
    color: #64ffda;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(100, 255, 218, 0.1);
    border-color: #64ffda;
}

.footer-bottom {
    border-top: 1px solid rgba(100, 255, 218, 0.2);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: #e0e0e0;
    margin: 0;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .wallet-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .main-connect-btn, .recovery-btn {
        width: 100%;
        max-width: 300px;
    }
    
    h1 {
        font-size: 48px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-social {
        justify-content: center;
    }
}