@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --bg-gradient: linear-gradient(135deg, #020617 0%, #0f172a 30%, #1e293b 100%);
    --surface: #1e293b;
    --surface-hover: rgba(51, 65, 85, 0.8);
    --border: #334155;
    --border-hover: rgba(34, 197, 94, 0.4);
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-400: #4ade80;
    --green-300: #86efac;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-section img {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--green-400);
    letter-spacing: -0.025em;
}

/* Navigation */
nav {
    display: flex;
    gap: 0.5rem;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

nav a:hover {
    color: var(--text-primary);
    background: var(--surface);
}

nav a.active {
    color: var(--green-400);
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Hero Section */
.hero-section {
    padding: 4rem 0 6rem;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--green-400) 0%, var(--green-500) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 500;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 48rem;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

/* Buttons */
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    outline: none;
    min-width: 8rem;
}

.btn-primary {
    background: var(--green-500);
    color: #000000;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: var(--green-600);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

/* Feature Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--green-400), var(--green-500));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--green-400);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Stats Section */
.stats-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 2rem 0;
    padding: 3rem 0;
    box-shadow: var(--shadow);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--green-400);
    display: block;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Server Info Card */
.server-info {
    background: var(--surface);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--green-500);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.server-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), transparent);
    pointer-events: none;
    border-radius: 0.75rem;
}

.server-ip {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green-400);
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    background: rgba(2, 6, 23, 0.8);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    border: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

/* Forms */
form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: rgba(15, 23, 42, 0.8);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Results Area */
.results-area {
    background: var(--surface);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-top: 1.5rem;
}

.server-badge {
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    color: #000000;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.player-avatar {
    border-radius: 0.5rem;
    border: 2px solid var(--green-400);
    margin: 1rem 0;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Error Messages */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    border-radius: 0.5rem;
    padding: 1rem;
    color: #fca5a5;
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Footer */
footer {
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

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

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--green-400);
}

/* Content Section */
.content-section {
    max-width: 48rem;
    margin: 0 auto;
    padding: 2rem;
    background: var(--surface);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.content-section h2 {
    color: var(--green-400);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.content-section h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    margin-top: 2rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.content-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.content-section strong {
    color: var(--green-400);
    font-weight: 600;
}

.content-section a {
    color: var(--green-400);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.content-section a:hover {
    color: var(--green-300);
    border-bottom-color: var(--green-400);
    text-decoration: none;
}

/* General link styling */
a {
    color: var(--green-400);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--green-300);
}

/* Specific link styling for body content */
main a:not(.btn):not(nav a) {
    color: var(--green-400);
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

main a:not(.btn):not(nav a):hover {
    color: var(--green-300);
    border-bottom-color: var(--green-400);
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin: -0.5rem 0 0 -0.5rem;
    border: 2px solid var(--border);
    border-top: 2px solid var(--green-400);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }

    .header-content {
        height: 3.5rem;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem 0;
    }

    .hero-section {
        padding: 3rem 0 4rem;
    }

    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.875rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 16rem;
    }

    nav {
        gap: 0.25rem;
    }

    nav a {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }

    .site-title {
        font-size: 1.125rem;
    }

    .server-ip {
        font-size: 1.125rem;
        padding: 0.5rem 0.75rem;
    }

    .feature-card,
    .content-section,
    form {
        padding: 1.5rem;
    }
}

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

.modal-content {
    position: relative;
    background: var(--surface);
    margin: 2% auto;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--green-600) 0%, var(--green-500) 100%);
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.close:hover,
.close:focus {
    opacity: 1;
}

.modal-body {
    padding: 2rem;
    color: var(--text-primary);
}

.guidelines-section h3 {
    color: var(--green-400);
    margin: 2rem 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.guidelines-section h3:first-child {
    margin-top: 0;
}

.guidelines-section p {
    margin: 0.75rem 0;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 1rem;
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
    background: rgba(30, 41, 59, 0.5);
    text-align: center;
}

.modal-footer p {
    margin: 0.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.modal-footer p strong {
    color: var(--green-400);
}

/* Mobile modal adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem 1.5rem;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .close {
        font-size: 1.5rem;
    }
}

/* Player Profile Styles */
.player-profile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow);
}

.player-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: center;
}

.player-skin-display {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

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

.player-avatar {
    border-radius: 8px;
    border: 2px solid var(--green-500);
    box-shadow: var(--shadow);
    background: var(--surface);
}

.skin-full-body {
    text-align: center;
}

.player-skin {
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: var(--surface);
}

.player-info {
    flex: 1;
}

.player-name {
    color: var(--green-400);
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.online {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green-400);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.offline {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-badge.online .status-dot {
    background: var(--green-400);
    animation: pulse 2s ease-in-out infinite;
}

.status-badge.offline .status-dot {
    background: var(--text-muted);
}

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

.player-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--border-hover);
    background: rgba(30, 41, 59, 0.9);
    transform: translateY(-2px);
}

.stat-value {
    color: var(--green-400);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile adjustments for player profile */
@media (max-width: 768px) {
    .player-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .player-skin-display {
        justify-content: center;
    }

    .player-name {
        font-size: 1.5rem;
    }

    .player-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }
}

/* Skin loading styles */
.skin-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.uuid-info {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: monospace;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 4px;
    display: inline-block;
}

/* Not found message styles */
.not-found-message {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
}

.not-found-message h4 {
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin: 0 0 1rem 0;
}

.not-found-message p {
    color: var(--text-muted);
    margin: 0.5rem 0;
    line-height: 1.6;
}

.not-found-message strong {
    color: var(--green-400);
}