@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #fff;
    background-attachment: fixed; /* Keeps gradient nice */
}

/* Critical: Responsive container */
.container {
    width: 100%;
    max-width: 900px; /* Slightly wider for desktop */
    margin: 0 auto;
    padding: 15px; /* More breathing room on mobile */
}

/* Glass card - optimized for mobile performance */
.card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px); /* Safari support */
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
}

/* Typography - scales better on mobile */
h1 { font-size: 2rem; margin-bottom: 20px; text-align: center; }
h2 { font-size: 1.6rem; margin: 25px 0 15px; text-align: center; }
h3 { font-size: 1.4rem; margin: 20px 0 10px; }

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.2rem; }
}

/* Forms - full width, touch-friendly */
form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

input, textarea, button {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    font-size: 16px; /* Minimum for mobile tap targets */
    transition: all 0.3s ease;
}

input, textarea {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

input:focus, textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* Buttons */
button {
    background: linear-gradient(45deg, #ff6b6b, #f06595);
    color: white;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    min-height: 50px; /* Touch-friendly */
}

button:hover {
    background: linear-gradient(45deg, #f06595, #ff6b6b);
    transform: scale(1.03);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Reaction buttons - stack vertically on mobile */
.reaction-btn {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    margin: 8px 4px;
    padding: 14px 20px;
    flex: 1;
    min-width: 140px;
}

.reaction-btn:nth-child(2) { background: linear-gradient(45deg, #43e97b, #38f9d7); }
.reaction-btn:nth-child(3) { background: linear-gradient(45deg, #fa709a, #fee140); }
.reaction-btn:nth-child(4) { background: linear-gradient(45deg, #ff9a9e, #fad0c4); }
.reaction-btn:nth-child(5) { background: linear-gradient(45deg, #a8edea, #fed6e3); }

@media (max-width: 600px) {
    .reaction-btn {
        width: 100%;
        margin: 8px 0;
    }
}

/* Posts */
.post {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Navigation - responsive */
nav {
    text-align: center;
    margin: 25px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

nav a {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    transition: 0.3s;
    min-width: 120px; /* Easier to tap */
}

nav a:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Leaderboard */
.leaderboard li {
    padding: 18px;
    margin: 12px 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
}

/* Messages */
.message {
    text-align: center;
    font-size: 1.1rem;
    margin: 20px 0;
    padding: 15px;
    border-radius: 12px;
    background: rgba(0, 255, 0, 0.2);
}

/* Links */
a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}