* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

body {
    font-family: 'Press Start 2P', cursive;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

.star {
    position: absolute;
    background: #fff;
    animation: blink 2s infinite;
}

.star-1 { width: 4px; height: 4px; top: 10%; left: 15%; animation-delay: 0s; }
.star-2 { width: 3px; height: 3px; top: 20%; right: 20%; animation-delay: 0.5s; }
.star-3 { width: 4px; height: 4px; top: 60%; left: 10%; animation-delay: 1s; }
.star-4 { width: 3px; height: 3px; bottom: 20%; right: 15%; animation-delay: 1.5s; }
.star-5 { width: 2px; height: 2px; top: 40%; right: 30%; animation-delay: 0.8s; }
.star-6 { width: 2px; height: 2px; bottom: 30%; left: 25%; animation-delay: 1.2s; }

@keyframes blink {
    0%, 50%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(255,255,255,0.8); }
    25%, 75% { opacity: 0.3; box-shadow: none; }
}

.pixel-cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    animation: float 20s infinite linear;
}

.cloud-1 {
    width: 80px;
    height: 40px;
    top: 15%;
    left: -100px;
    clip-path: polygon(
        0 40%, 15% 40%, 15% 20%, 30% 20%, 30% 0, 
        70% 0, 70% 20%, 85% 20%, 85% 40%, 100% 40%,
        100% 100%, 0 100%
    );
}

.cloud-2 {
    width: 60px;
    height: 30px;
    top: 70%;
    left: -100px;
    animation-delay: -10s;
    clip-path: polygon(
        0 50%, 20% 50%, 20% 30%, 40% 30%, 40% 0,
        60% 0, 60% 30%, 80% 30%, 80% 50%, 100% 50%,
        100% 100%, 0 100%
    );
}

@keyframes float {
    from { transform: translateX(0); }
    to { transform: translateX(calc(100vw + 100px)); }
}

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

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

.search-header {
    text-align: center;
    margin-bottom: 40px;
    animation: slideDown 0.6s ease-out;
}

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

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




@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.title {
    font-size: 20px;
    color: #000;
    margin-bottom: 20px;
    text-shadow: 3px 3px 0 #ff00ff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pixel-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #00f260 0%, #0575e6 100%);
    border: 4px solid #000;
    position: relative;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
}

.pixel-avatar::before,
.pixel-avatar::after {
    content: '';
    position: absolute;
    background: #000;
}

.pixel-avatar::before {
    width: 12px;
    height: 12px;
    top: 25px;
    left: 20px;
    box-shadow: 36px 0 0 #000;
}

.pixel-avatar::after {
    width: 32px;
    height: 8px;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab {
    flex: 1;
    padding: 15px;
    background: #ddd;
    border: 4px solid #000;
    cursor: pointer;
    text-align: center;
    font-size: 10px;
    transition: all 0.2s;
    position: relative;
}

.tab:hover {
    background: #fff;
    transform: translateY(-2px);
}

.tab.active {
    background: #00ff00;
    box-shadow: inset 0 0 0 2px #000, inset 0 0 0 4px #00ff00;
}

.tab:active {
    transform: translateY(2px);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-size: 10px;
    color: #000;
}

input {
    width: 100%;
    padding: 15px;
    border: 4px solid #000;
    background: #fff;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    box-shadow: inset 4px 4px 0 rgba(0,0,0,0.1);
    transition: all 0.2s;
}

input:focus {
    outline: none;
    box-shadow: 
        inset 4px 4px 0 rgba(0,0,0,0.1),
        0 0 0 4px #ffd700;
}

.pixel-button {
    width: 100%;
    padding: 20px;
    background: linear-gradient(180deg, #ff6b6b 0%, #ee5a6f 100%);
    border: 4px solid #000;
    color: #fff;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    cursor: pointer;
    position: relative;
    box-shadow: 
        0 6px 0 #8b0000,
        0 8px 10px rgba(0,0,0,0.3);
    transition: all 0.1s;
    margin-top: 20px;
}

.pixel-button:hover {
    background: linear-gradient(180deg, #ff8787 0%, #ff6b6b 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 0 #8b0000,
        0 10px 15px rgba(0,0,0,0.3);
}

.pixel-button:active {
    transform: translateY(4px);
    box-shadow: 
        0 2px 0 #8b0000,
        0 4px 5px rgba(0,0,0,0.3);
}

.links {
    margin-top: 25px;
    text-align: center;
    font-size: 8px;
}

.links a {
    color: #764ba2;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.links a:hover {
    color: #00ff00;
    transform: translateY(-2px);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.pixel-corner {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #000;
}

.pixel-corner-tl { top: -8px; left: -8px; }
.pixel-corner-tr { top: -8px; right: -8px; }
.pixel-corner-bl { bottom: -8px; left: -8px; }
.pixel-corner-br { bottom: -8px; right: -8px; }

@media (max-width: 640px) {
    .container {
        padding: 25px;
        border-width: 6px;
    }

    .title {
        font-size: 14px;
    }

    .pixel-avatar {
        width: 60px;
        height: 60px;
    }

    .pixel-avatar::before {
        width: 8px;
        height: 8px;
        top: 18px;
        left: 15px;
        box-shadow: 22px 0 0 #000;
    }

    .pixel-avatar::after {
        width: 24px;
        height: 6px;
        bottom: 15px;
    }

    .tab {
        padding: 12px;
        font-size: 8px;
    }

    label, input {
        font-size: 8px;
    }

    .pixel-button {
        font-size: 10px;
        padding: 15px;
    }

    .links {
        font-size: 7px;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 20px;
    }

    .title {
        font-size: 12px;
    }

    .tab {
        font-size: 7px;
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .logo {
        font-size: 24px;
    }

    .tagline {
        font-size: 8px;
    }

    .search-panel {
        padding: 20px;
    }

    .search-form {
        flex-direction: column;
    }

    .search-input-wrapper {
        width: 100%;
    }

    .search-button {
        width: 100%;
    }

    .search-stats {
        font-size: 7px;
    }

    .export-button {
        font-size: 7px;
        padding: 10px 15px;
    }

    .result-item {
        padding: 20px;
    }

    .result-title {
        font-size: 11px;
    }

    .result-url {
        font-size: 7px;
    }

    .result-description {
        font-size: 8px;
    }

    .meta-badge {
        font-size: 6px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 20px;
    }

    .search-input {
        font-size: 9px;
        padding: 15px 15px 15px 45px;
    }

    .search-button {
        font-size: 9px;
        padding: 15px 20px;
    }

    .result-number {
        font-size: 8px;
        padding: 6px 12px;
    }

    .result-title {
        font-size: 10px;
    }

    .empty-icon {
        font-size: 48px;
    }

    .empty-text {
        font-size: 10px;
    }
}

/* Скрытый класс */
.hidden {
    display: none;
}

/* Сообщение об успехе */
.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #00ff00;
    border: 6px solid #000;
    padding: 30px;
    font-size: 14px;
    text-align: center;
    z-index: 1000;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.3);
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    from {
        transform: translate(-50%, -50%) scale(0);
    }
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
}

.logo {
    font-size: 32px;
    color: #fff;
    text-shadow: 
        4px 4px 0 #ff00ff,
        8px 8px 0 #00ffff,
        12px 12px 20px rgba(0,0,0,0.3);
    margin-bottom: 15px;
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.tagline {
    font-size: 10px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.search-panel {
    background: #f0f0f0;
    border: 8px solid #000;
    box-shadow: 
        0 0 0 2px #fff,
        0 0 0 10px #000,
        8px 8px 0 0 rgba(0,0,0,0.4);
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    animation: slideUp 0.6s ease-out;
}

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

.results-container {
    animation: fadeIn 0.8s ease-out;
}

.results-container.show {
    display: block;
}

.search-stats {
    background: #fff;
    border: 4px solid #000;
    padding: 15px 20px;
    margin-bottom: 20px;
    font-size: 9px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
    animation: fadeIn 0.8s ease-out;
}

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

.search-stats {
    font-size: 7px;
}

.stats-text {
    color: #666;
}

.loading {
    text-align: center;
    padding: 40px;
    animation: fadeIn 0.3s ease-out;
}

.loading.show {
    display: block;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 6px solid #000;
    background: linear-gradient(45deg, #ff00ff 25%, transparent 25%, transparent 75%, #00ffff 75%);
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 10px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.8s ease-out;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.empty-text {
    font-size: 12px;
    color: #000000;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 10px;
}

.empty-subtext {
    font-size: 8px;
    color: rgba(255,255,255,0.8);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Скролл */

.search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input-wrapper {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 18px 18px 18px 50px;
    border: 4px solid #000;
    background: #fff;
    font-family: 'Press Start 2P', cursive;
    font-size: 11px;
    box-shadow: inset 4px 4px 0 rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    box-shadow: 
        inset 4px 4px 0 rgba(0,0,0,0.1),
        0 0 0 4px #00ff00;
    background: #ffffd0;
}

.search-button {
    padding: 18px 30px;
    background: linear-gradient(180deg, #00d4ff 0%, #0099cc 100%);
    border: 4px solid #000;
    color: #fff;
    font-family: 'Press Start 2P', cursive;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.1s;
    white-space: nowrap;
}

.search-button:hover {
    background: linear-gradient(180deg, #33ddff 0%, #00aadd 100%);
    transform: translateY(-2px);
}

.search-button:hover:not(:disabled) {
    background: linear-gradient(180deg, #33ddff 0%, #00aadd 100%);
    transform: translateY(-2px);
}

.search-button:active:not(:disabled) {
    transform: translateY(4px);
}

.search-button:disabled {
    background: linear-gradient(180deg, #cbd9dc 0%, #9aa9ad 100%);
    cursor: not-allowed;
    transform: none;
}

.export-button {
    padding: 12px 20px;
    background: linear-gradient(180deg, #50fa7b 0%, #2ecc71 100%);
    border: 4px solid #000;
    color: #000;
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    cursor: pointer;
    box-shadow: 
        0 4px 0 #1a8040,
        0 6px 8px rgba(0,0,0,0.2);
    transition: all 0.1s;
    white-space: nowrap;
}

.export-button:hover {
    background: linear-gradient(180deg, #6fff8f 0%, #3fdd81 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 0 #1a8040,
        0 8px 12px rgba(0,0,0,0.3);
}

.export-button:active {
    transform: translateY(3px);
    box-shadow: 
        0 1px 0 #1a8040,
        0 3px 5px rgba(0,0,0,0.2);
}

.result-item {
    background: #fff;
    border: 6px solid #000;
    padding: 25px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 6px 6px 0 rgba(0,0,0,0.3);
    transition: all 0.2s;
    animation: slideInResult 0.5s ease-out backwards;
}

.result-item:nth-child(1) { animation-delay: 0.1s; }
.result-item:nth-child(2) { animation-delay: 0.2s; }
.result-item:nth-child(3) { animation-delay: 0.3s; }
.result-item:nth-child(4) { animation-delay: 0.4s; }
.result-item:nth-child(5) { animation-delay: 0.5s; }


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

.result-item:hover {
    transform: translateX(5px);
    box-shadow: 8px 8px 0 rgba(0,0,0,0.4);
}

.result-number {
    position: absolute;
    top: -15px;
    left: 20px;
    background: #ff6b6b;
    border: 4px solid #000;
    padding: 8px 15px;
    font-size: 10px;
    color: #fff;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
}

.result-title {
    font-size: 14px;
    color: #0575e6;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
    display: block;
}

.result-title:hover {
    color: #ff00ff;
    transform: translateX(5px);
}

.result-url {
    font-size: 8px;
    color: #2ecc71;
    margin-bottom: 12px;
    word-break: break-all;
    text-decoration: none;
    display: block;
}

.result-description {
    font-size: 9px;
    color: #333;
    line-height: 1.8;
}

.result-meta {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed #ddd;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.meta-badge {
    padding: 6px 12px;
    background: #f0f0f0;
    border: 2px solid #000;
    font-size: 7px;
    color: #666;
}

.search-input.error {
    outline: none;
    box-shadow:
        inset 4px 4px 0 rgba(0,0,0,0.1),
        0 0 0 4px #ec490e;
    background: #ffffd0;
}

.logout-button {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background: linear-gradient(180deg, #ff6b6b 0%, #ee5a6f 100%);
    border: 4px solid #000;
    color: #fff;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    cursor: pointer;
    box-shadow: 
        0 4px 0 #8b0000,
        0 6px 8px rgba(0,0,0,0.3);
    transition: all 0.1s;
    z-index: 1000;
    text-decoration: none;
    display: inline-block;
}

.logout-button:hover {
    background: linear-gradient(180deg, #ff8787 0%, #ff6b6b 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 0 #8b0000,
        0 8px 12px rgba(0,0,0,0.3);
}

.logout-button:active {
    transform: translateY(2px);
    box-shadow: 
        0 2px 0 #8b0000,
        0 4px 5px rgba(0,0,0,0.3);
}

.sponsors-section {
    margin-bottom: 30px;
    animation: slideUp 0.6s ease-out;
}

.sponsors-container {
    background: #f0f0f0;
    border: 6px solid #000;
    padding: 20px;
    position: relative;
    box-shadow: 
        0 0 0 2px #fff,
        0 0 0 8px #000,
        6px 6px 0 0 rgba(0,0,0,0.3);
}

.sponsors-title {
    font-size: 12px;
    color: #000;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 2px 2px 0 rgba(255,0,255,0.3);
}

.sponsors-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 10px 0;
    /* Кастомный скроллбар для блока спонсоров */
    scrollbar-width: thin;
    scrollbar-color: #ff00ff #000;
}

.sponsors-scroll::-webkit-scrollbar {
    height: 8px;
}

.sponsors-scroll::-webkit-scrollbar-track {
    background: #000;
    border: 2px solid #fff;
}

.sponsors-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #ff00ff 0%, #00ffff 100%);
    border: 2px solid #000;
}

.sponsors-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #ff33ff 0%, #33ffff 100%);
}

.sponsors-grid {
    display: inline-flex;
    gap: 15px;
}

.sponsor-item {
    display: inline-block;
    flex-shrink: 0;
    background: #fff;
    border: 4px solid #000;
    padding: 15px;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
    position: relative;
}

.sponsor-item:hover {
    transform: translateY(-4px);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.4);
    background: #ffffd0;
}

.sponsor-item::before {
    content: '⭐';
    position: absolute;
    top: -12px;
    right: -12px;
    font-size: 16px;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sponsor-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 2px solid #000;
    display: block;
    image-rendering: pixelated;
}

.sponsor-name {
    margin-top: 10px;
    font-size: 8px;
    color: #000;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    max-width: 120px;
}

.sponsors-corner {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #000;
}

.sponsors-corner-tl { top: -6px; left: -6px; }
.sponsors-corner-tr { top: -6px; right: -6px; }
.sponsors-corner-bl { bottom: -6px; left: -6px; }
.sponsors-corner-br { bottom: -6px; right: -6px; }

/* Адаптивность */
@media (max-width: 768px) {
    .logout-button {
        top: 10px;
        right: 10px;
        padding: 10px 15px;
        font-size: 8px;
    }

    .sponsors-title {
        font-size: 10px;
    }

    .sponsor-image {
        width: 100px;
        height: 100px;
    }

    .sponsor-name {
        font-size: 7px;
        max-width: 100px;
    }

    .sponsors-container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .logout-button {
        font-size: 7px;
        padding: 8px 12px;
    }

    .sponsor-image {
        width: 80px;
        height: 80px;
    }

    .sponsor-name {
        font-size: 6px;
        max-width: 80px;
    }
}