* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Share Tech Mono', monospace;
    background: #0a0c15;
    color: #0f0;
    min-height: 100vh;
}

.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #0a0c15 0%, #05070c 100%);
}

.matrix-bg::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('../images/matrix-bg.svg');
    background-repeat: repeat;
    background-size: 60px;
    opacity: 0.03;
    pointer-events: none;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: #05070c;
    border-bottom: 1px solid #0f0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.logo span {
    color: #f33;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: #0f0;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #f33;
}

.main-container {
    margin-top: 80px;
    padding: 40px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.hero {
    text-align: center;
    padding: 50px 20px;
    background: rgba(0, 20, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 50px;
    border: 1px solid rgba(0, 255, 0, 0.2);
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.hero h1 i {
    color: #f33;
}

.hero p {
    font-size: 0.95rem;
    color: #8f8;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.tool-card {
    background: rgba(10, 15, 25, 0.95);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s;
}

.tool-card:hover {
    transform: translateY(-3px);
    border-color: #0f0;
}

.tool-image {
    width: 100%;
    height: 190px;
    object-fit: cover;
    background: #1a1f2a;
}

.tool-info {
    padding: 20px;
}

.tool-name {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 12px;
    color: #0f0;
}

.tool-description {
    font-size: 0.85rem;
    color: #8f8;
    line-height: 1.6;
    margin-bottom: 15px;
    white-space: pre-line;
    word-wrap: break-word;
    min-height: 80px;
}

.tool-price {
    font-size: 1.5rem;
    color: #ffaa33;
    margin-bottom: 12px;
}

.tool-price small {
    font-size: 0.75rem;
    color: #8f8;
}

.video-link {
    display: inline-block;
    color: #ffaa33;
    font-size: 0.8rem;
    margin-bottom: 12px;
    text-decoration: none;
}

.video-link:hover {
    text-decoration: underline;
}

.btn-buy {
    width: 100%;
    background: #0a0;
    border: none;
    padding: 12px;
    font-family: monospace;
    font-weight: bold;
    font-size: 1rem;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-buy:hover {
    background: #0c0;
}

.empty-state {
    text-align: center;
    padding: 60px;
    background: rgba(10, 15, 25, 0.8);
    border-radius: 12px;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #8f8;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: #0a0f1a;
    border: 1px solid #0f0;
    border-radius: 12px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #f33;
}

.close-modal:hover {
    color: #f66;
}

.qr-code {
    background: white;
    padding: 15px;
    display: inline-block;
    border-radius: 10px;
    margin: 15px 0;
}

.qr-code img {
    width: 150px;
    height: 150px;
}

.wallet-address {
    background: #1a1f2a;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    word-break: break-all;
    margin: 10px 0;
}

.modal-input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: #1a1f2a;
    border: 1px solid #0f0;
    color: #0f0;
    border-radius: 6px;
    font-family: monospace;
}

.btn-verify {
    background: #0a0;
    border: none;
    padding: 12px;
    width: 100%;
    font-family: monospace;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
}

.btn-verify:hover {
    background: #0c0;
}

.btn-verify:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.alert {
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
    font-size: 0.8rem;
}

.alert-success {
    background: rgba(0, 255, 0, 0.15);
    border-left: 3px solid #0f0;
}

.alert-error {
    background: rgba(255, 51, 51, 0.15);
    border-left: 3px solid #f33;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid rgba(0, 255, 0, 0.2);
    margin-top: 50px;
    background: #05070c;
}

footer a {
    color: #0f0;
    text-decoration: none;
}

footer a:hover {
    color: #f33;
}

/* Admin Styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    margin-top: 80px;
}

.admin-card {
    background: rgba(10, 15, 25, 0.95);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.admin-card h2 {
    margin-bottom: 20px;
    border-left: 3px solid #0f0;
    padding-left: 15px;
    color: #0f0;
    font-size: 1.2rem;
}

.admin-input {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    background: #1a1f2a;
    border: 1px solid #0f0;
    color: #0f0;
    border-radius: 6px;
    font-family: monospace;
}

.admin-btn {
    background: #0a0;
    color: #fff;
    padding: 12px 24px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border-radius: 6px;
    margin-top: 10px;
    font-family: monospace;
}

.admin-btn:hover {
    background: #0c0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.admin-table th {
    background: rgba(0, 255, 0, 0.1);
    color: #0f0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 10px;
}

.video-preview {
    margin-top: 10px;
    display: none;
}

.video-preview video {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
}

#imagePreview {
    max-width: 100px;
    margin-top: 5px;
    display: none;
    border-radius: 5px;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0f1a 0%, #0c1220 100%);
}

.login-box {
    background: rgba(10, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid #0f0;
    width: 350px;
    text-align: center;
}

.login-box h2 {
    color: #0f0;
    margin-bottom: 30px;
}

.login-input {
    width: 100%;
    margin: 10px 0;
    padding: 12px;
    background: #1e2a3a;
    border: 1px solid #0f0;
    color: #0f0;
    border-radius: 8px;
    font-family: monospace;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 20px;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .nav-links a {
        font-size: 0.85rem;
    }
    
    .main-container {
        padding: 20px;
        margin-top: 65px;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .admin-container {
        padding: 15px;
    }
}