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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.preferences {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.progress-bar {
    background: #eee;
    height: 20px;
    border-radius: 10px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress {
    background: #4CAF50;
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    color: white;
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
}

.filters {
    margin-bottom: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    padding: 0 1rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    flex: 0 1 auto;
    min-width: auto;
}

.search-container {
    margin-bottom: 1.5rem;
}

.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: 1px solid #ddd;
    border-radius: 24px;
    font-size: 16px;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.08);
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #4285F4;
    box-shadow: 0 1px 8px rgba(66, 133, 244, 0.2);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #5F6368;
    font-size: 18px;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #f0f0f0;
}

.filter-btn.active {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.objectives-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.objective-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    position: relative;
}

.objective-card:hover {
    transform: translateY(-2px);
}

.objective-card.completed {
    border-left: 4px solid #4CAF50;
}

.complete-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    border: 2px solid #ddd;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #ddd;
}

.complete-button:hover {
    border-color: #4CAF50;
    background: #f0f0f0;
}

.completed .complete-button {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.objective-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-right: 2.5rem;
}

.type-id-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.objective-type {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.objective-id {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

.type-K1 { background: #e3f2fd; color: #1565c0; }
.type-K2 { background: #f3e5f5; color: #7b1fa2; }
.type-K3 { background: #fbe9e7; color: #d84315; }

.objective-time {
    font-size: 0.875rem;
    color: #666;
}

.objective-name {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
}

.objective-link {
    display: block;
    width: 100%;
    color: #2196F3;
    text-decoration: none;
    font-size: 0.875rem;
    text-align: center;
    padding: 0.5rem;
    border: 1px solid #2196F3;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.mark-complete-btn {
    display: block;
    width: 100%;
    padding: 0.5rem;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.mark-complete-btn:hover {
    background: #388E3C;
}

.completed .mark-complete-btn {
    background: #9E9E9E;
}

.objective-link:hover {
    text-decoration: underline;
}

footer {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    color: #666;
}

@media (min-width: 768px) {
    .filters {
        min-width: 600px;
        max-width: 800px;
        margin: 0 auto 2.5rem;
    }
}