/* WX - Web Exchange Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #00ff00;
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
header {
    background: #111;
    border-bottom: 2px solid #00ff00;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.wx-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  font-size: 1.8rem;
  font-weight: bold;
  color: #000;
  border-radius: 6px;
  font-family: Arial, sans-serif;
  animation: logoColorShift 3s infinite alternate;
  box-shadow: 0 0 8px #00ffff, 0 0 15px #00ffff inset;
  transition: all 0.3s ease-in-out;
}

@keyframes logoColorShift {
  0% {
    background-color: #00ffff;
    color: #000;
    box-shadow: 0 0 8px #00ffff, 0 0 15px #00ffff inset;
  }
  25% {
    background-color: #e6194b;
    color: #fff;
    box-shadow: 0 0 8px #e6194b, 0 0 15px #e6194b inset;
  }
  50% {
    background-color: #ffe119;
    color: #000;
    box-shadow: 0 0 8px #ffe119, 0 0 15px #ffe119 inset;
  }
  75% {
    background-color: #4363d8;
    color: #fff;
    box-shadow: 0 0 8px #4363d8, 0 0 15px #4363d8 inset;
  }
  100% {
    background-color: #911eb4;
    color: #fff;
    box-shadow: 0 0 8px #911eb4, 0 0 15px #911eb4 inset;
  }
}


.lang-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background: transparent;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.lang-btn:hover,
.lang-btn.active {
    background: #00ff00;
    color: #000;
    box-shadow: 0 0 10px #00ff00;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

main {
    padding: 2rem 0;
}

/* Search Section */
.search-section {
    margin-bottom: 2rem;
}

.search-container {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

#searchInput {
    flex: 1;
    background: #222;
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 0.8rem 2.5rem 0.8rem 0.8rem; /* добавлен отступ справа под крестик */
    border-radius: 4px;
    font-size: 1rem;
}

#searchInput::placeholder {
    color: #666;
}

#searchInput:focus {
    outline: none;
    box-shadow: 0 0 10px #00ff00;
}

/* Кнопка поиска */
.search-btn {
    background: #00ff00;
    color: #000;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #00ffff;
    box-shadow: 0 0 15px #00ffff;
}

/* Крестик сброса */
#clearSearchBtn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 20px;
    color: #ccc;
    display: none;
    z-index: 20;
    user-select: none;
}


/* Submit Section */
.submit-section {
    margin-bottom: 3rem;
}

.submit-form {
    max-width: 800px;
    margin: 0 auto;
    background: #111;
    padding: 2rem;
    border-radius: 8px;
    border: 2px solid #00ff00;
}

.submit-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

.form-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group input {
    flex: 1;
    background: #222;
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 0.8rem;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input::placeholder {
    color: #666;
}

.form-group input:focus {
    outline: none;
    box-shadow: 0 0 10px #00ff00;
}

.form-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-free,
.btn-paid {
    padding: 1rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-free {
    background: #00ff00;
    color: #000;
}

.btn-free:hover {
    background: #00ffff;
    box-shadow: 0 0 15px #00ffff;
}

.btn-paid {
    background: #ff6b6b;
    color: #fff;
}

.btn-paid:hover {
    background: #ff5252;
    box-shadow: 0 0 15px #ff5252;
}

/* Pixel Wall */
.pixel-wall-section {
    margin-top: 3rem;
}

.pixel-wall {
    background: #111;
    border: 2px solid #00ff00;
    border-radius: 8px;
    padding: 1.5rem;
}

.wall-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.wall-header h2 {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

.wall-container {
    background: #000;
    border: 2px solid #333;
    border-radius: 4px;
    padding: 1rem;
    min-height: 400px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 30px);
    grid-template-rows: repeat(auto-fill, 30px);
    gap: 1px;
    justify-content: center;
    align-content: start;
}

.pixel {
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 1px;
    position: relative;
}

.pixel:hover {
    transform: scale(1.5);
    z-index: 1000;
    box-shadow: 0 0 10px currentColor;
}

.pixel.paid {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

.no-links,
.no-results {
    text-align: center;
    color: #666;
    font-size: 1.2rem;
    padding: 2rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #111;
    margin: 5% auto;
    padding: 2rem;
    border: 2px solid #00ff00;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.close {
    color: #ff6b6b;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #ff5252;
    text-shadow: 0 0 10px #ff5252;
}

.modal-content h3 {
    color: #00ffff;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px #00ffff;
}

/* Code Modal */
.code-container {
    margin: 1rem 0;
}

#embedCode {
    width: 100%;
    height: 80px;
    background: #222;
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 0.8rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    resize: none;
}

.copy-btn,
.verify-btn {
    background: #00ff00;
    color: #000;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin: 0.5rem 0.5rem 0 0;
    transition: all 0.3s ease;
}

.copy-btn:hover,
.verify-btn:hover {
    background: #00ffff;
    box-shadow: 0 0 15px #00ffff;
}

#verificationResult {
    margin-top: 1rem;
}

.success {
    color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    padding: 0.8rem;
    border-radius: 4px;
    border: 1px solid #00ff00;
}

.error {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    padding: 0.8rem;
    border-radius: 4px;
    border: 1px solid #ff6b6b;
}

/* Payment Modal */
.payment-info {
    text-align: center;
}

.payment-info p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.paypal-btn {
    background: #0070ba;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.paypal-btn:hover {
    background: #005ea6;
    box-shadow: 0 0 15px #0070ba;
}

/* Link Details Modal */
#linkDetails {
    line-height: 1.8;
}

#linkDetails h3 {
    margin-bottom: 1rem;
    color: #00ffff;
}

#linkDetails p {
    margin-bottom: 0.8rem;
}

#linkDetails a {
    color: #00ff00;
    text-decoration: none;
}

#linkDetails a:hover {
    text-decoration: underline;
    text-shadow: 0 0 5px #00ff00;
}

/* Error Notification */
.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff6b6b;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    z-index: 10001;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-group {
        flex-direction: column;
    }
    
    .form-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-free,
    .btn-paid {
        width: 100%;
        max-width: 300px;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
    }

    .wall-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, 40px); /* фиксированное количество колонок */
        gap: 1px;
        justify-content: center;
        align-content: start;
    }

    .pixel {
        width: 40px;
        height: 40px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
    }
    
    header .container {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    .submit-form {
        padding: 1.5rem;
    }

    .wall-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, 40px); /* сохраняем ту же структуру */
        gap: 1px;
        justify-content: center;
        align-content: start;
    }

    .pixel {
        width: 40px;
        height: 40px;
    }

    .modal-content {
        width: 95%;
        padding: 1rem;
    }
}


/* Tooltip */
.pixel-tooltip {
    position: absolute;
    background: #111;
    color: #00ff00;
    border: 1px solid #00ff00;
    border-radius: 4px;
    padding: 8px;
    font-size: 11px;
    z-index: 10001;
    pointer-events: none;
    white-space: nowrap;
    max-width: 200px;
    box-shadow: 0 2px 8px rgba(0, 255, 0, 0.3);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
}

.pixel-tooltip.show {
    opacity: 1;
    transform: scale(1);
}

.pixel-tooltip .tooltip-text {
    font-weight: bold;
    margin-bottom: 2px;
}

.pixel-tooltip .tooltip-url {
    font-size: 9px;
    color: #888;
    margin-bottom: 2px;
}

.pixel-tooltip .tooltip-type {
    font-size: 9px;
    color: #00ffff;
}

/* Additional animations and effects */
.submit-form {
    animation: fadeInUp 0.6s ease;
}

.pixel-wall {
    animation: fadeInUp 0.8s ease;
}

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

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

::-webkit-scrollbar-track {
    background: #222;
}

::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00ffff;
}
