* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #0f1b2b 0%, #1a3a52 40%, #2d5f7e 70%, #4a8ba8 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* stars */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 60px 70px, white, transparent),
        radial-gradient(1px 1px at 50px 50px, white, transparent),
        radial-gradient(1px 1px at 130px 80px, white, transparent),
        radial-gradient(2px 2px at 90px 10px, white, transparent),
        radial-gradient(1px 1px at 150px 120px, white, transparent),
        radial-gradient(1px 1px at 200px 40px, white, transparent),
        radial-gradient(2px 2px at 170px 90px, white, transparent),
        radial-gradient(1px 1px at 240px 60px, white, transparent),
        radial-gradient(1px 1px at 280px 20px, white, transparent);
    background-size: 300px 200px;
    background-repeat: repeat;
    pointer-events: none;
    z-index: 0;
}

/* stars 2: stars bigger */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(3px 3px at 100px 50px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(3px 3px at 250px 100px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 400px 30px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(3px 3px at 550px 80px, rgba(255, 255, 255, 0.85), transparent),
        radial-gradient(2px 2px at 180px 150px, rgba(255, 255, 255, 0.9), transparent);
    background-size: 600px 200px;
    background-repeat: repeat;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1em;
    opacity: 0.95;
}

.search-container {
    margin-bottom: 20px;
}

#mod-search {
    width: 100%;
    padding: 15px 20px;
    font-size: 1em;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    outline: none;
    transition: box-shadow 0.3s;
}

#mod-search:focus {
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.mod-list {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.mod-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

.mod-item:last-child {
    border-bottom: none;
}

.mod-item:hover {
    background-color: #ddfff2;
}

.mod-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mod-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mod-image-placeholder {
    background: linear-gradient(135deg, #5a8f7b 0%, #3d6354 100%);
    position: relative;
}

.mod-image-placeholder::after {
    content: 'No Image';
    font-size: 1.0em;
    opacity: 0.5;
    color: white;
}

.mod-content {
    flex: 1;
    min-width: 0;
}

.mod-name {
    font-size: 1.3em;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 8px;
}

.mod-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    color: #666;
    font-size: 0.95em;
}

.mod-author {
    color: #5a8f7b;
}

.author-link {
    color: #5a8f7b;
    text-decoration: none;
    transition: color 0.2s;
}

.author-link:hover {
    color: #3d6354;
    text-decoration: underline;
}

.mod-version {
    background: #f0f0f0;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85em;
}

.mod-link {
    color: #5a8f7b;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.2s;
}

.mod-link:hover {
    color: #3d6354;
    text-decoration: underline;
}

.loading {
    text-align: center;
    padding: 50px;
    color: white;
    font-size: 1.2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.error {
    background: #ff6b6b;
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
}

@media (max-width: 600px) {
    .header h1 {
        font-size: 2em;
    }

    .mod-item {
        flex-direction: column;
        gap: 15px;
    }

    .mod-image {
        width: 100%;
        height: 200px;
    }

    .mod-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

.tiali-link {
    color: #ffd700;
    text-decoration: none;
    font-weight: bold;
}