/* Base container styles */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.names-dropdown {
    margin-top: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.names-select {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 0.9em;
    margin-top: 5px;
}

.names-dropdown h3 {
    margin: 0 0 10px 0;
    font-size: 1em;
    color: #2c3e50;
    text-align: center;
}

.names-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.names-dropdown li {
    padding: 5px 10px;
    margin-bottom: 5px;
    background-color: white;
    border-radius: 4px;
    font-size: 0.9em;
}

.services-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    justify-content: center;
}

.service-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: #f8f9fa;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.service-checkbox:hover {
    background-color: #e9ecef;
}

.service-checkbox input {
    margin: 0;
}

/* Navigation buttons */
.nav-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 0 5px;
    width: 100%;
    box-sizing: border-box;
}

.nav-button {
    flex: 1 1 auto;
    min-width: 120px;
    max-width: none;
    text-align: center;
    white-space: nowrap;
    padding: 8px 15px;
    font-size: 0.9em;
    text-decoration: none;
    color: white;
    background-color: #2563eb;
    border-radius: 4px;
}

/* Anecdote card styles */
.anecdote-card {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

.anecdote-header {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #2c3e50;
    word-wrap: break-word;
}

.anecdote-content {
    margin-bottom: 15px;
    color: #34495e;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Collapse system styles */
.collapsible-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background-color: white;
    transition: background-color 0.3s ease;
    margin-bottom: 0;
}

.collapsible-header:hover {
    background-color: #f8f9fa;
}

.collapsible-header::after {
    content: '▼';
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.collapsible-header.collapsed::after {
    transform: rotate(-90deg);
}

.collapsible-content {
    max-height: 1000px;
    overflow: hidden;
    transition: all 0.3s ease-out;
    opacity: 1;
}

.collapsible-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

/* Podium styles */
.podium-stats {
    margin-bottom: 30px;
}

.podium-section, .services-section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.podium-section h2, .services-section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 0;
    font-size: 1.5em;
}

.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    padding: 20px;
    min-height: 280px;
    margin-top: 20px;
}

.podium-place {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.podium-place:hover {
    transform: translateY(-5px);
}

.podium-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 10px;
}

.podium-place.first {
    background-color: #fef3c7;
    height: 200px;
    width: 140px;
    margin-bottom: 0;
}

.podium-place.second {
    background-color: #f3f4f6;
    height: 160px;
    width: 130px;
    margin-bottom: 40px;
}

.podium-place.third {
    background-color: #fff7ed;
    height: 120px;
    width: 120px;
    margin-bottom: 80px;
}

/* Position indicators */
.position {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.name {
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
    font-size: 0.9em;
    word-break: break-word;
}

.score {
    color: #666;
    font-size: 0.85em;
    margin-bottom: 5px;
    text-align: center;
}

.service {
    font-style: italic;
    color: #666;
    font-size: 0.8em;
    text-align: center;
}

/* Service card styles */
.top-service-card {
    background-color: #fef3c7;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-top: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Vote and share buttons */
.vote-buttons {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
}

.vote-buttons form {
    display: contents;
}

.vote-button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    min-width: 80px;
    justify-content: center;
    white-space: nowrap;
}

.like-button {
    background-color: #4CAF50;
    color: white;
}

.dislike-button {
    background-color: #f44336;
    color: white;
}

.share-button {
    background-color: #2563eb;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.9em;
    min-width: 80px;
    margin-left: auto;
    white-space: nowrap;
}

.share-button:hover {
    background-color: #1d4ed8;
}

/* Metadata and admin controls */
.metadata {
    font-size: 0.85em;
    color: #666;
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 10px;
    word-wrap: break-word;
}

.admin-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.admin-button {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.8em;
    color: white;
    display: inline-flex;
    align-items: center;
    transition: transform 0.1s ease;
    min-width: 60px;
    justify-content: center;
}

.admin-button:hover {
    transform: scale(1.05);
}

.admin-button:active {
    transform: scale(0.95);
}

.modify-button {
    background-color: #059669;
}

.modify-button:hover {
    background-color: #047857;
}

.delete-button {
    background-color: #dc2626;
}

.delete-button:hover {
    background-color: #b91c1c;
}

/* Title styles */
h1 {
    font-size: 1.5em;
    margin: 15px 0;
    text-align: center;
    word-wrap: break-word;
    padding: 0 10px;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .container {
        padding: 5px;
    }

    .podium-container {
        min-height: auto;
        padding: 10px 0;
        flex-direction: row;
        gap: 5px;
        margin: 0;
        width: 100%;
    }

    .podium-place {
        padding: 8px;
        width: calc(33% - 4px) !important;
        margin: 0 !important;
        height: auto !important;
        min-height: 100px;
    }

    .podium-block {
        padding: 5px;
    }

    .name {
        font-size: 0.75em;
        margin-bottom: 2px;
    }

    .score {
        font-size: 0.7em;
        margin-bottom: 2px;
    }

    .service {
        font-size: 0.65em;
    }

    .position {
        font-size: 1.5em;
        margin-bottom: 5px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 5px;
    }

    .nav-buttons {
        padding: 0;
    }

    .nav-button {
        width: 100%;
        min-width: 0;
        padding: 10px;
        margin-bottom: 5px;
    }

    .anecdote-card {
        padding: 12px;
        margin-bottom: 15px;
    }

    .metadata {
        font-size: 0.8em;
    }

    h1 {
        font-size: 1.3em;
        margin: 10px 0;
    }

    .collapsible-header::after {
        font-size: 0.7em;
    }
    
    .vote-buttons {
        flex-wrap: nowrap;
    }

    .vote-button, 
    .share-button {
        font-size: 0.85em;
        padding: 8px 10px;
        min-width: 60px;
    }
}

@media (max-width: 480px) {
    .vote-buttons {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 6px;
    }

    .vote-button, 
    .share-button {
        font-size: 0.8em;
        padding: 8px;
        min-width: 50px;
        flex: 1;
    }

    .admin-buttons {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .admin-button {
        flex: 1;
        font-size: 0.75em;
        padding: 6px;
        min-width: 50px;
    }
}

@media (max-width: 400px) {
    .podium-place {
        padding: 5px;
        width: calc(33% - 3px) !important;
    }

    .name {
        font-size: 0.7em;
    }

    .score {
        font-size: 0.65em;
    }

    .service {
        font-size: 0.6em;
    }
}