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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #B4C618 0%, #7d8a10 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

.controls {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.sort-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn-sort {
    background: #f0f0f0;
    color: #333;
}

.btn-sort:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.btn-sort.active {
    background: #B4C618;
    color: white;
}

.btn-add {
    background: #ED1B24;
    color: white;
}

.btn-add:hover {
    background: #d4141c;
    transform: translateY(-2px);
}

.ideas-list {
    display: grid;
    gap: 25px;
}

.idea-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.idea-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.idea-content {
    flex: 1;
    padding: 25px;
    display: flex;
    gap: 20px;
}

.idea-image {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.idea-text {
    flex: 1;
}

.idea-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.idea-description {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
}

.idea-meta {
    display: flex;
    align-items: center;
    margin-top: 15px;
    gap: 10px;
    font-size: 0.9rem;
    color: #999;
}

.vote-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background: linear-gradient(135deg, #B4C618 0%, #7d8a10 100%);
    min-width: 150px;
    gap: 15px;
}

.vote-count {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.vote-label {
    color: white;
    font-size: 0.9rem;
    opacity: 0.9;
}

.vote-btn {
    background: white;
    color: #8a9713;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.vote-btn:hover:not(.voted) {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.vote-btn.voted {
    background: #4CAF50;
    color: white;
    cursor: pointer;
}

.vote-btn.voted:hover {
    background: #f44336;
    transform: scale(1.1);
}

.loading {
    text-align: center;
    padding: 50px;
    color: white;
    font-size: 1.2rem;
}

.error {
    background: #f44336;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message {
    background: #4CAF50;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: white;
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: scale(0.9);
    opacity: 0;
    animation: modalIn 0.25s ease forwards;
}

@keyframes modalIn {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    color: #333;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #B4C618;
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
}

.form-hint {
    font-size: 0.8rem;
    color: #999;
    margin-top: 4px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

.btn-cancel {
    background: #f0f0f0;
    color: #333;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.btn-submit {
    background: #B4C618;
    color: white;
}

.btn-submit:hover {
    background: #9aab14;
    transform: translateY(-2px);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-error {
    background: #ffebee;
    color: #c62828;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: none;
}

@media (max-width: 768px) {
    .idea-card {
        flex-direction: column;
    }

    .idea-content {
        flex-direction: column;
    }

    .idea-image {
        width: 100%;
        height: 200px;
    }

    .vote-section {
        flex-direction: row;
        min-width: auto;
        width: 100%;
    }

    h1 {
        font-size: 2rem;
    }

    .controls {
        flex-direction: column;
    }
}