/* Hot Dog Tracker - Fun Color Scheme */
/* Color Palette:
   - Mustard Yellow: #FFDB58
   - Ketchup Red: #D32F2F
   - Hot Dog Brown: #C19A6B
   - Bun Cream: #F5E6D3
   - Dark Text: #3E2723
*/

:root {
    --mustard: #FFDB58;
    --ketchup: #D32F2F;
    --hotdog: #C19A6B;
    --bun: #F5E6D3;
    --text-dark: #3E2723;
    --relish: #4CAF50;
}

.dogtracker-container {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bun);
    min-height: 100vh;
    padding: 2rem 0;
}

.dogtracker-header {
    background: linear-gradient(135deg, var(--mustard) 0%, var(--ketchup) 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.dogtracker-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.dogtracker-header .subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-top: 4px solid var(--mustard);
}

.stat-card.ketchup {
    border-top-color: var(--ketchup);
}

.stat-card.hotdog {
    border-top-color: var(--hotdog);
}

.stat-card.relish {
    border-top-color: var(--relish);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0.5rem 0;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.content-section h2 {
    color: var(--ketchup);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--mustard);
}

.btn-hotdog {
    background: var(--ketchup);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-hotdog:hover {
    background: var(--mustard);
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-hotdog.secondary {
    background: var(--hotdog);
}

.btn-hotdog.secondary:hover {
    background: var(--mustard);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--mustard);
}

.recent-entries {
    list-style: none;
    padding: 0;
}

.entry-item {
    background: var(--bun);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--ketchup);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.entry-item:nth-child(odd) {
    border-left-color: var(--mustard);
}

.entry-date {
    font-weight: 600;
    color: var(--text-dark);
}

.entry-details {
    color: #666;
    font-size: 0.9rem;
}

.entry-quantity {
    background: var(--ketchup);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

#map {
    height: 500px;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 2rem;
}

/* Activity Graph (GitHub-style) */
.activity-graph {
    overflow-x: auto;
    padding: 1rem 0;
    min-height: 150px;
}

.activity-months {
    display: grid;
    grid-auto-flow: column;
    grid-gap: 3px;
    margin-bottom: 5px;
    font-size: 0.75rem;
    color: #666;
}

.activity-grid {
    display: grid;
    grid-template-rows: repeat(7, 12px);
    grid-auto-flow: column;
    grid-gap: 3px;
}

.activity-square {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.activity-square.clickable-square {
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
}

.activity-square.clickable-square:hover {
    transform: scale(1.3);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 10;
}

.activity-square.empty {
    background: transparent;
}

.activity-square.level-0 {
    background: #ebedf0;
}

.activity-square.level-1 {
    background: #FFEAA7;
}

.activity-square.level-2 {
    background: #FDCB6E;
}

.activity-square.level-3 {
    background: #F79F1F;
}

.activity-square.level-4 {
    background: #EE5A6F;
}

.activity-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #666;
}

.legend-squares {
    display: flex;
    gap: 3px;
}

.legend-squares .activity-square {
    width: 12px;
    height: 12px;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.hotdog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.hotdog-table thead {
    background: var(--ketchup);
    color: white;
}

.hotdog-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.hotdog-table tbody tr {
    border-bottom: 1px solid #ddd;
    transition: all 0.2s;
}

.hotdog-table tbody tr.clickable-row {
    cursor: pointer;
}

.hotdog-table tbody tr.clickable-row:hover {
    background-color: var(--bun);
    transform: scale(1.01);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hotdog-table td {
    padding: 0.75rem;
}

.hotdog-table .date-cell {
    font-weight: 600;
    color: var(--text-dark);
}

.hotdog-table .quantity-cell {
    text-align: center;
    font-weight: 700;
    color: var(--ketchup);
}

.hotdog-table .rating-cell {
    text-align: center;
}

.hotdog-table .notes-cell {
    font-size: 0.85rem;
    color: #666;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: slideIn 0.3s;
    font-family: 'JetBrains Mono', monospace;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    color: var(--ketchup);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--mustard);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: var(--ketchup);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-weight: 600;
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.detail-item div {
    font-size: 1.1rem;
    color: var(--text-dark);
    padding: 0.75rem;
    background: var(--bun);
    border-radius: 5px;
    border-left: 3px solid var(--mustard);
}

@media (max-width: 768px) {
    .dogtracker-header h1 {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 2rem;
    }

    .hotdog-table {
        font-size: 0.8rem;
    }

    .hotdog-table th,
    .hotdog-table td {
        padding: 0.5rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
}
