:root {
    --bg-color: #1a1a1a;
    --card-bg: #2c2c2c;
    --text-color: #e0e0e0;
    --header-color: #4db8ff;
    --border-color: #444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 8px;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

h1 {
    color: var(--header-color);
    margin: 0; /* Odstraní horní a spodní okraj */
    font-size: 1.5em; /* Mírně zmenšíme písmo */
}

.btn {
    text-decoration: none;
    color: white;
    padding: 4px 12px;
    font-size: 0.9em; /* Mírně zmenšíme i písmo tlačítek */
    border-radius: 5px;
    background-color: #007bff;
}

.btn-add {
    background-color: #28a745;
}

.project-grid {
    display: grid;
    /* Zde si můžete upravit minimální šířku karty (např. na 480px, 380px atd.) */
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
    align-items: start;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.card-header {
    padding: 2px;
    color: white;
    display: flex;
    flex-wrap: wrap; /* Umožní zalamování, pokud je málo místa */
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

    .card-header h2, .card-header p {
        margin: 0;
    }

    .card-header h2 {
        font-size: 1.2em;
        margin-bottom: 5px;
        flex-basis: 100%; /* Nadpis bude vždy na samostatném řádku */
    }

    .card-header p {
        font-size: 0.9em;
    }

    .card-header a {
        color: white;
    }

.card-body {
    padding: 2px;
}

.project-photo {
    text-align: center;
    margin-bottom: 20px;
}

    .project-photo img {
        max-width: 100%;
        height: auto;
        border-radius: 6px;
    }

.task-list h3 {
    margin-top: 0;
}

.task-list table {
    width: 100%;
    border-collapse: collapse;
}

.task-list td {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
}

.task-list tr:last-child td {
    border-bottom: none;
}

input[type="checkbox"] {
    width: 10px;
    height: 10px;
}

.task-description {
    word-break: break-word;
}

    .task-description.done {
        text-decoration: line-through;
        color: #888;
    }

.task-assignee {
    text-align: right;
    font-style: italic;
    color: #aaa;
}

.progress-container {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    height: 5px;
    width: 60px;
    align-self: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.progress-bar {
    background: linear-gradient(90deg, #28a745, #22c55e);
    height: 100%;
    transition: width 0.5s ease-in-out;
}

.progress-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.4em;
    font-weight: bold;
}

.progress-bar[style="width: 100%;"] {
    background: linear-gradient(90deg, #4db8ff, #38bdf8);
}

.project-grid {
    gap: 5px;
}

.card-header h2 {
    font-size: 0.4em;
}

.card-header p {
    font-size: 0.4em;
}

.card-header a {
    font-size: 0.4em;
}

.task-list h3 {
    font-size: 0.4em;
}

.task-list td {
    font-size: 0.3em;
    padding: 1px;
}

.task-assignee {
    font-size: 0.5em;
}

.progress-text {
    font-size: 0.4em;
}

.progress-container {
    height: 18px;
}
