:root {
    --primary: #3498db;
    --secondary: #2c3e50;
    --background: #f4f7f6;
    --text: #333;
    --card-bg: #fff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text);
    margin: 0;
    line-height: 1.6;
}

header {
    background-color: var(--secondary);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Ranking List Styles */
.item-card {
    background: var(--card-bg);
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
}

.item-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    background-color: var(--card-bg);
}

.item-header:hover {
    background-color: #f9f9f9;
}

.rank-score {
    width: 60px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
    text-align: center;
}

.item-title {
    flex-grow: 1;
    font-size: 1.3rem;
    font-weight: 600;
}

.vote-controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #ccc;
    transition: color 0.2s;
}

.vote-btn:hover { color: var(--primary); }
.vote-btn.up.active { color: #27ae60; }
.vote-btn.down.active { color: #e74c3c; }

/* Accordion Content */
.item-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease;
    background-color: #fcfcfc;
    border-top: 1px solid #eee;
}

.item-card.expanded .item-details {
    max-height: 500px;
    padding: 1.5rem;
}

.item-details p { margin-bottom: 1rem; }
.item-details strong { display: block; margin-bottom: 0.3rem; color: var(--secondary); }
.item-link { color: var(--primary); text-decoration: none; font-weight: bold; }

/* Suggest Form */
#suggest-section {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

#suggest-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input, textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
}

button:hover { background-color: #2980b9; }

footer {
    text-align: center;
    padding: 3rem;
    color: #777;
    margin-top: 2rem;
}
