/* SpawnCrate - Shared Styles */
@import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@400;600;700&family=Rajdhani:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0e0a;
    color: #fff;
    min-height: 100vh;
}

/* Header */
.header {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(180deg, #0f1a0f 0%, #0a0e0a 100%);
}

.logo {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.logo span {
    color: #82B448;
}

.tagline {
    color: #888;
    font-size: 1.1rem;
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.container.wide {
    max-width: 1200px;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Oxanium', sans-serif;
}

h2 {
    color: #82B448;
    text-align: center;
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    display: inline-block;
    background: #82B448;
    color: #000;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #6a9438;
}

.btn-disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Mod Grid (Landing page) */
.mod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.mod-card {
    background: #0f1a0f;
    border-radius: 12px;
    padding: 0;
    border: 2px solid #1a2a1a;
    border-top: 4px solid #82B448;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.mod-card:hover {
    border-color: #82B448;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(130, 180, 72, 0.15);
}

/* Color cycle for all mod cards (8 colors, repeating) */
.mod-card:nth-child(8n+2) {
    border-top-color: #ff6b6b;
}
.mod-card:nth-child(8n+2):hover {
    border-color: #ff6b6b;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.15);
}

.mod-card:nth-child(8n+3) {
    border-top-color: #a55eea;
}
.mod-card:nth-child(8n+3):hover {
    border-color: #a55eea;
    box-shadow: 0 8px 25px rgba(165, 94, 234, 0.15);
}

.mod-card:nth-child(8n+4) {
    border-top-color: #26de81;
}
.mod-card:nth-child(8n+4):hover {
    border-color: #26de81;
    box-shadow: 0 8px 25px rgba(38, 222, 129, 0.15);
}

.mod-card:nth-child(8n+5) {
    border-top-color: #fd9644;
}
.mod-card:nth-child(8n+5):hover {
    border-color: #fd9644;
    box-shadow: 0 8px 25px rgba(253, 150, 68, 0.15);
}

.mod-card:nth-child(8n+6) {
    border-top-color: #f368e0;
}
.mod-card:nth-child(8n+6):hover {
    border-color: #f368e0;
    box-shadow: 0 8px 25px rgba(243, 104, 224, 0.15);
}

.mod-card:nth-child(8n+7) {
    border-top-color: #ffd93d;
}
.mod-card:nth-child(8n+7):hover {
    border-color: #ffd93d;
    box-shadow: 0 8px 25px rgba(255, 217, 61, 0.15);
}

.mod-card:nth-child(8n+8) {
    border-top-color: #4ecdc4;
}
.mod-card:nth-child(8n+8):hover {
    border-color: #4ecdc4;
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.15);
}

/* 8n+1 keeps the default green #82B448 */

.mod-card-accent {
    display: none;
}

.mod-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    height: 220px;
}

.mod-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.3;
    min-height: 48px;
}

.mod-name-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.mod-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    color: #fff;
    background: linear-gradient(135deg, #82B448, #5a8028);
    flex-shrink: 0;
}

.mod-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Icon color cycle (8 colors, repeating) */
.mod-card:nth-child(8n+2) .mod-icon {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.mod-card:nth-child(8n+3) .mod-icon {
    background: linear-gradient(135deg, #a55eea, #8854d0);
}

.mod-card:nth-child(8n+4) .mod-icon {
    background: linear-gradient(135deg, #26de81, #20bf6b);
}

.mod-card:nth-child(8n+5) .mod-icon {
    background: linear-gradient(135deg, #fd9644, #fa8231);
}

.mod-card:nth-child(8n+6) .mod-icon {
    background: linear-gradient(135deg, #f368e0, #d63384);
}

.mod-card:nth-child(8n+7) .mod-icon {
    background: linear-gradient(135deg, #ffd93d, #f9ca24);
}

.mod-card:nth-child(8n+8) .mod-icon {
    background: linear-gradient(135deg, #4ecdc4, #26a69a);
}

.mod-stats {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
    margin-left: 60px;
    height: 65px;
    line-height: 1.5;
}

.mod-stats .mod-creator {
    color: #82B448;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mod-stats .mod-counts {
    color: #ffd700;
    font-weight: 600;
}

.mod-stats .mod-updated {
    color: #8899a6;
    font-size: 0.85rem;
}

.mod-stats .mod-links {
    margin-top: 2px;
}

.mod-stats.submit-stats {
    color: #ffd700;
    font-weight: 500;
}

.mod-card .btn {
    align-self: flex-start;
    max-width: 150px;
    margin-left: 60px;
    margin-top: auto;
    background: #82B448;
    color: #111;
}

.coming-soon {
    opacity: 0.5;
}

/* Submit/Add Mod Card - Always First */
.submit-card {
    border-top-color: #82B448;
    background: linear-gradient(135deg, #0f1a0f 0%, #111e11 100%);
}

.submit-card:hover {
    border-color: #82B448;
    box-shadow: 0 8px 25px rgba(130, 180, 72, 0.2);
}

.submit-card .mod-icon {
    background: linear-gradient(135deg, #82B448, #5a8028);
}

.coming-soon .mod-card-accent {
    background: #444;
}

.coming-soon .mod-icon {
    background: #444;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 0.9rem;
}

.footer a {
    color: #82B448;
    text-decoration: none;
}

/* Forms */
input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea {
    padding: 10px 12px;
    background: #162016;
    border: 1px solid #243624;
    border-radius: 5px;
    color: #fff;
    font-size: 0.95rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #82B448;
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-muted {
    color: #888;
}

.text-center {
    text-align: center;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}


/* Search Box */
.search-box {
    margin-bottom: 30px;
    text-align: center;
}

.search-box input {
    width: 100%;
    max-width: 400px;
    padding: 14px 20px;
    font-size: 1rem;
    background: #0f1a0f;
    border: 2px solid #1a2a1a;
    border-radius: 8px;
    color: #fff;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: #82B448;
    outline: none;
}

.search-box input::placeholder {
    color: #666;
}


/* CurseForge Link */
.cf-link {
    color: #f16436;
    text-decoration: none;
    font-size: 0.85rem;
}

.cf-link:hover {
    text-decoration: underline;
}


/* Mobile Responsive */
@media (max-width: 768px) {
    .header {
        padding: 40px 15px;
    }

    .logo {
        font-size: 2rem;
    }

    .tagline {
        font-size: 0.95rem;
    }

    .container {
        padding: 20px 15px;
    }

    h2 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .search-box input {
        padding: 12px 15px;
        font-size: 16px; /* Prevents iOS zoom */
    }

    .mod-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mod-card-content {
        padding: 20px;
        height: auto;
        min-height: 180px;
    }

    .mod-name {
        font-size: 1.1rem;
        min-height: auto;
    }

    .mod-icon, .mod-image {
        width: 40px;
        height: 40px;
    }

    .mod-stats {
        margin-left: 52px;
        font-size: 0.85rem;
        height: auto;
    }

    .mod-card .btn {
        margin-left: 0;
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }

    .footer {
        padding: 30px 15px;
    }
}

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

    .mod-name {
        font-size: 1rem;
        gap: 10px;
    }

    .mod-icon, .mod-image {
        width: 36px;
        height: 36px;
    }

    .mod-stats {
        margin-left: 46px;
    }
}


/* Total Stats */
.total-stats {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.total-stats span {
    color: #888;
}

.total-stats span:nth-child(odd) {
    color: #82B448;
    font-weight: 500;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    border-top: 1px solid #1a2a1a;
    margin-top: 40px;
}

.footer a {
    color: #82B448;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer strong {
    color: #fff;
}

.footer-links {
    margin-top: 10px;
    font-size: 0.9rem;
}

.footer-disclaimer {
    margin-top: 15px;
    font-size: 0.75rem;
    color: #555;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}


/* Hero Section */
.hero {
    background: linear-gradient(135deg, #080c08 0%, #0f1a0f 50%, #080c08 100%);
    padding: 60px 20px 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(130, 180, 72, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.logo-large {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.logo-large span {
    color: #82B448;
}

.hero-tagline {
    font-family: 'Oxanium', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.3;
}

.hero-tagline span {
    color: #82B448;
    text-shadow: 0 0 12px rgba(130, 180, 72, 0.6), 0 0 25px rgba(130, 180, 72, 0.3);
}

.hero-subtitle {
    color: #aaa;
    font-size: 1.2rem;
    margin-bottom: 35px;
}

/* Animated gradient text */
.highlight-gradient {
    background: linear-gradient(90deg, #82B448, #a8d65e, #82B448);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-animation: gradient-shift 3s ease infinite;
    animation: gradient-shift 3s ease infinite;
    font-weight: 600;
}

@-webkit-keyframes gradient-shift {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

@keyframes gradient-shift {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

/* Pulsing glow text */
.highlight-pulse {
    color: #f97316;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
    -webkit-animation: pulse-glow 2s ease-in-out infinite;
    animation: pulse-glow 2s ease-in-out infinite;
}

@-webkit-keyframes pulse-glow {
    0%, 100% { text-shadow: 0 0 10px rgba(249, 115, 22, 0.5); }
    50% { text-shadow: 0 0 20px rgba(249, 115, 22, 0.8), 0 0 30px rgba(249, 115, 22, 0.4); }
}

@keyframes pulse-glow {
    0%, 100% { text-shadow: 0 0 10px rgba(249, 115, 22, 0.5); }
    50% { text-shadow: 0 0 20px rgba(249, 115, 22, 0.8), 0 0 30px rgba(249, 115, 22, 0.4); }
}

.hero-stats {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 50px;
    margin-bottom: 35px;
    flex-wrap: wrap;
    width: 100%;
}

.hero-stat {
    text-align: center;
    flex-shrink: 0;
}

.hero-stat-number {
    font-family: 'Oxanium', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #82B448;
    line-height: 1;
}

.hero-stat-label {
    color: #888;
    font-size: 0.9rem;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-features {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    width: 100%;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #aaa;
    font-size: 0.95rem;
}

.feature-icon {
    font-size: 1.2rem;
}

/* Mobile Hero */
@media (max-width: 768px) {
    .hero {
        padding: 40px 15px;
    }

    .logo-large {
        font-size: 2.2rem;
    }

    .hero-tagline {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 25px;
    }

    .hero-stat-number {
        font-size: 1.8rem;
    }

    .hero-features {
        gap: 15px;
    }

    .hero-feature {
        font-size: 0.85rem;
    }
}

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

    .hero-tagline {
        font-size: 1.3rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        padding: 0 10px;
    }

    .highlight-gradient {
        background: none;
        -webkit-background-clip: unset;
        -webkit-text-fill-color: #82B448;
        background-clip: unset;
        color: #82B448;
        animation: none;
    }

    .highlight-pulse {
        color: #f97316;
        text-shadow: none;
        animation: none;
    }

    .hero-stats {
        gap: 15px;
        flex-wrap: wrap;
    }

    .hero-stat-number {
        font-size: 1.5rem;
    }

    .hero-stat-label {
        font-size: 0.75rem;
    }
}


/* Submit Form Page */
.container.narrow {
    max-width: 600px;
}

.submit-intro {
    color: #888;
    margin-bottom: 30px;
    text-align: center;
}

.submit-form {
    background: #0f1a0f;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #1a2a1a;
}

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

.submit-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.submit-form .required {
    color: #ef4444;
}

.submit-form .optional {
    color: #666;
    font-weight: 400;
    font-size: 0.85rem;
}

.submit-form input,
.submit-form textarea {
    width: 100%;
    padding: 12px 15px;
    background: #080c08;
    border: 1px solid #1a2a1a;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
}

.submit-form input:focus,
.submit-form textarea:focus {
    outline: none;
    border-color: #82B448;
}

.submit-form small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.8rem;
}

.submit-form textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-large {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

.btn-secondary {
    background: #162016;
}

.btn-secondary:hover {
    background: #243624;
}

.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
}

.message.success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.message.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.success-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}


/* Submit Card Plus Icon */
.plus-icon {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
}


/* Mod Creator */
.mod-creator {
    color: #82B448;
    font-weight: 500;
}


/* Search + sort row */
.search-sort-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.search-sort-row input {
    flex: 1;
    margin-bottom: 0 !important;
}
#sort-select {
    background: #111a11;
    color: #fff;
    border: 1px solid #1e331e;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    flex-grow: 0;
    width: auto !important;
    max-width: 150px;
}

/* Tabs - wrap nicely on mobile */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

@media (max-width: 600px) {
    .search-sort-row {
        flex-direction: column;
    }
    .search-sort-row input {
        width: 100%;
    }
    #sort-select {
        width: 100% !important;
        max-width: 100%;
    }
}
