.calculator-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.calculator-container h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2em;
}

.calculator-container .description {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.input-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.input-section h2 {
    margin-top: 0;
    color: #34495e;
    font-size: 1.3em;
}

.input-hint {
    color: #7f8c8d;
    margin-bottom: 10px;
}

.format-example {
    background: #ecf0f1;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9em;
    border-left: 4px solid #3498db;
}

.format-example code {
    background: none;
    padding: 0;
    color: #2980b9;
}

textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: "Monaco", "Consolas", monospace;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
}

.button-group {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.primary-btn, .secondary-btn {
    padding: 12px 30px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.primary-btn {
    background: #3498db;
    color: white;
}

.primary-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.secondary-btn {
    background: #95a5a6;
    color: white;
}

.secondary-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.result-section {
    margin-bottom: 30px;
}

.result-section h2 {
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.time-slot-group {
    margin-bottom: 25px;
}

.time-slot-group h3 {
    color: #34495e;
    background: #e8f4fc;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* New Sketch Layout Styles */
.court-row {
    display: flex;
    border: 1px solid #333;
    background: #fff;
    margin-bottom: -1px; /* Collapses borders */
}

.court-row:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.court-row:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    margin-bottom: 15px;
}

.cr-col {
    padding: 12px 10px;
    display: flex;
    align-items: center;
    border-right: 1px solid #333;
    font-size: 0.95em;
    color: #333;
}

.cr-col:last-child {
    border-right: none;
}

.cr-court {
    width: 80px;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    background: #fafafa;
}

.cr-players {
    flex: 2;
    min-width: 150px;
}

.cr-fee {
    flex: 1.5;
    min-width: 180px;
    white-space: nowrap;
}

.court-num {
    font-size: 1em;
}

.p-count {
    font-weight: bold;
}

.p-names {
    color: #555;
}

.fee-avg {
    font-size: 0.85em;
    color: #666;
    margin-left: 4px;
}

.no-fee {
    color: #999;
    font-style: italic;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .court-row {
        flex-wrap: wrap;
        border: 1px solid #ccc;
        border-radius: 8px;
        margin-bottom: 10px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    
    .cr-col {
        border-right: none;
        border-bottom: 1px solid #eee;
        width: 100%;
    }
    
    .cr-col:last-child {
        border-bottom: none;
    }
    
    .cr-court {
        width: 100%;
        justify-content: flex-start;
        background: #f0f4f8;
        font-weight: bold;
        color: #2c3e50;
    }
    
    .cr-players, .cr-fee {
        flex: auto;
        width: 100%;
    }
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.summary-table th,
.summary-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.summary-table th {
    background: #34495e;
    color: white;
    font-weight: 600;
}

.summary-table tr:hover {
    background: #f8f9fa;
}

.person-name {
    font-weight: 600;
    color: #2c3e50;
}

.total-amount {
    font-weight: 700;
    color: #e74c3c;
    font-size: 1.1em;
}

.grand-total {
    text-align: right;
    font-size: 1.2em;
    color: #2c3e50;
    margin-top: 15px;
    padding: 15px;
    background: #d5f5e3;
    border-radius: 8px;
}

.person-detail-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.person-detail-card h3 {
    color: #3498db;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.detail-table th,
.detail-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.detail-table th {
    background: #f8f9fa;
    color: #7f8c8d;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
}

/* Personal Detail Table Sketch Style */
.detail-table-sketch {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #333;
}

.detail-table-sketch th,
.detail-table-sketch td {
    border: 1px solid #333;
    padding: 10px;
    text-align: center;
}

.detail-table-sketch th {
    background-color: #f0f0f0;
    font-weight: bold;
}

.detail-table-sketch .total-row td {
    background-color: #fafafa;
    border-top: 2px solid #333;
}

/* Summary Table Sketch Style */
.summary-table-sketch {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #333;
    margin-bottom: 20px;
}

.summary-table-sketch th,
.summary-table-sketch td {
    border: 1px solid #333;
    padding: 15px;
    text-align: center;
}

.summary-table-sketch th {
    background-color: #f0f0f0;
    font-weight: bold;
}

.summary-table-sketch .person-name {
    font-weight: 600;
}

.summary-table-sketch .total-amount {
    font-weight: bold;
}

.type-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.type-tag.court {
    background: #3498db;
    color: white;
}

.type-tag.shuttlecock {
    background: #9b59b6;
    color: white;
}

.export-btn {
    background: #1abc9c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.export-btn:hover {
    background: #16a085;
    transform: translateY(-2px);
}

.markdown-preview {
    background: #2d3436;
    color: #dfe6e9;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9em;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
}

.markdown-preview code {
    background: none;
    padding: 0;
}
