/* CalWhat Calculator Platform - SplitBillCalculator Specific Styles */
/* This file contains calculator-specific styles */
  

    .input-label {
        font-weight: 500;
        color: #4a5568;
        margin-bottom: 8px;
        display: block;
        font-size: 0.95rem;
    }

    .form-input {
        width: 100%;
        padding: 10px 12px;
        border: 2px solid #48bb78;
        border-radius: 12px;
        font-size: 1rem;
        transition: all 0.3s ease;
        background: #f0fff4;
    }

    .form-input:focus {
        outline: none;
        border-color: #38a169;
        box-shadow: 0 0 0 4px rgba(72, 187, 120, 0.2);
        transform: translateY(-2px);
    }

    /* 墊付表格 */
    .payment-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 10px;
    }

    .payment-table thead th {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 12px;
        font-weight: 600;
        text-align: left;
    }

    .payment-table thead th:first-child {
        border-radius: 10px 0 0 10px;
    }

    .payment-table thead th:last-child {
        border-radius: 0 10px 10px 0;
    }

    .payment-table tbody tr {
        background: #f7fafc;
        transition: all 0.3s ease;
    }

    .payment-table tbody tr:hover {
        background: #edf2f7;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

    .payment-table tbody td {
        padding: 10px;
    }

    .payment-table tbody td:first-child {
        border-radius: 10px 0 0 10px;
    }

    .payment-table tbody td:last-child {
        border-radius: 0 10px 10px 0;
    }

    .payment-table select,
    .payment-table input {
        width: 100%;
        padding: 8px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        font-size: 0.95rem;
    }

    .payment-table select:focus,
    .payment-table input:focus {
        outline: none;
        border-color: #667eea;
    }

    .btn-remove {
        background: #ef4444;
        color: white;
        border: none;
        border-radius: 50%;
        width: 32px;
        height: 32px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 1rem;
    }

    .btn-remove:hover {
        background: #dc2626;
        transform: scale(1.1);
    }

    .quick-amount-btns {
        display: flex;
        gap: 4px;
        margin-top: 6px;
        flex-wrap: wrap;
    }

    .quick-amount-btn {
        flex: 1;
        min-width: 40px;
        padding: 4px 8px;
        background: #f3f4f6;
        border: 1px solid #d1d5db;
        border-radius: 6px;
        font-size: 0.75rem;
        cursor: pointer;
        transition: all 0.2s ease;
        color: #374151;
        font-weight: 500;
    }

    .quick-amount-btn:hover {
        background: #667eea;
        border-color: #667eea;
        color: white;
        transform: translateY(-1px);
    }

    .quick-amount-btn:active {
        transform: translateY(0);
    }

    .btn-add {
        width: 100%;
        padding: 12px;
        background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
        color: white;
        border: none;
        border-radius: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-top: 10px;
    }

    .btn-add:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
    }

    /* 結果區 */
    .result-main {
        text-align: center;
        margin-bottom: 30px;
    }

    .result-label {
        font-size: 1rem;
        color: #4a5568;
        font-weight: 500;
        margin-bottom: 10px;
    }

    .result-value {
        font-family: 'Roboto Mono', monospace;
        font-size: 3rem;
        font-weight: 700;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 20px;
        animation: pulse 0.5s ease;
    }

    @keyframes pulse {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.05); }
    }

    .result-details {
        background: #f7fafc;
        padding: 20px;
        border-radius: 12px;
    }

    .result-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .result-item:last-child {
        border-bottom: none;
    }

    .result-item-label {
        font-size: 0.95rem;
        color: #4a5568;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .result-item-value {
        font-family: 'Roboto Mono', monospace;
        font-weight: 600;
        color: #2d3748;
        font-size: 1.1rem;
    }

    /* 個人明細 */
    .person-detail {
        background: #f7fafc;
        border-radius: 10px;
        padding: 15px;
        margin-bottom: 15px;
        transition: all 0.3s ease;
    }

    .person-detail:hover {
        background: #edf2f7;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

    .person-detail-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }

    .person-name {
        font-weight: 600;
        font-size: 1.1rem;
        color: #2d3748;
    }

    .person-status {
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.9rem;
        font-weight: 600;
    }

    .status-owe {
        background: #fee;
        color: #c53030;
    }

    .status-paid {
        background: #e6fffa;
        color: #047857;
    }

    .status-even {
        background: #e2e8f0;
        color: #4a5568;
    }

    .person-detail-body {
        font-size: 0.9rem;
        color: #4a5568;
    }

    .detail-row {
        display: flex;
        justify-content: space-between;
        padding: 5px 0;
    }

    .items-list {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px dashed #cbd5e0;
    }

    .items-list ul {
        list-style: none;
        padding-left: 10px;
    }

    .items-list li {
        padding: 3px 0;
        font-size: 0.85rem;
    }

    /* 結算方案 */
    .transaction-item {
        display: flex;
        align-items: center;
        padding: 12px;
        background: white;
        border-radius: 8px;
        margin-bottom: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        transition: all 0.3s ease;
    }

    .transaction-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }

    .transaction-from,
    .transaction-to {
        font-weight: 600;
        color: #2d3748;
        flex: 1;
    }

    .transaction-arrow {
        margin: 0 10px;
        color: #667eea;
        font-size: 1.2rem;
    }

    .transaction-amount {
        font-family: 'Roboto Mono', monospace;
        font-weight: 700;
        font-size: 1.1rem;
        color: #48bb78;
        margin-right: 10px;
    }

    .btn-copy-amount {
        background: #667eea;
        color: white;
        border: none;
        border-radius: 6px;
        padding: 6px 10px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .btn-copy-amount:hover {
        background: #5a67d8;
        transform: translateY(-2px);
    }

    .settlement-summary {
        text-align: center;
        margin-top: 20px;
        padding: 15px;
        background: #e6fffa;
        border-radius: 10px;
        color: #047857;
        font-weight: 600;
    }


    .settlement-info {
        text-align: center;
        margin-bottom: 15px;
    }

    .badge {
        display: inline-block;
        padding: 6px 12px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-radius: 20px;
        font-size: 0.9rem;
        font-weight: 600;
    }

    /* 按鈕 */
    /* 響應式設計 */
    @media (max-width: 992px) {
        .page-header h1 {
            font-size: 2.5rem;
        }
    }

    @media (max-width: 768px) {
        .page-header h1 {
            font-size: 2rem;
        }

        .result-value {
            font-size: 2rem;
        }

        .glass-card {
            padding: 20px;
        }

        .payment-table {
            font-size: 0.9rem;
        }

        .transaction-item {
            flex-wrap: wrap;
        }

        .transaction-from,
        .transaction-to {
            flex: 0 0 100%;
        }

        .transaction-arrow {
            flex: 0 0 100%;
            text-align: center;
            margin: 5px 0;
        }
    }

    @media (max-width: 480px) {
        .page-header h1 {
            font-size: 1.5rem;
        }

        .main-container {
            padding: 0 10px;
        }
    }

    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateY(-30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .form-check {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 10px;
    }

    .form-check input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
    }

    .form-check label {
        cursor: pointer;
        user-select: none;
    }

    #nameInputSection {
        margin-top: 15px;
    }

    .input-group-custom {
        margin-bottom: 15px;
    }

    .name-ratio-row {
        display: flex;
        gap: 10px;
        align-items: center;
        margin-bottom: 12px;
    }

    .name-ratio-row .name-input {
        flex: 1;
    }

    .ratio-input-wrapper {
        flex: 0 0 120px;
    }

    .ratio-input {
        width: 100%;
        padding: 8px;
        border: 2px solid #48bb78;
        border-radius: 8px;
        font-size: 0.95rem;
        text-align: center;
    }

    .ratio-label {
        font-size: 0.85rem;
        color: #666;
        text-align: center;
        margin-bottom: 4px;
    }

    .participants-selector {
        position: relative;
        z-index: 1;
    }

    .participants-btn {
        background: #f3f4f6;
        border: 1px solid #d1d5db;
        padding: 6px 10px;
        border-radius: 6px;
        font-size: 0.85rem;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        gap: 5px;
        width: 100%;
        justify-content: space-between;
    }

    .participants-btn:hover {
        background: #e5e7eb;
        border-color: #667eea;
    }

    .participants-btn.active {
        border-color: #667eea;
        background: #eef2ff;
    }

    .participants-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 2px solid #667eea;
        border-radius: 8px;
        margin-top: 5px;
        padding: 10px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 9999;
        max-height: 200px;
        overflow-y: auto;
    }

    /* 確保表格行不會遮擋下拉選單 */
    .payment-table tbody tr {
        position: relative;
        z-index: 1;
    }

    .participant-checkbox {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px;
        cursor: pointer;
        border-radius: 4px;
        transition: background 0.2s;
    }

    .participant-checkbox:hover {
        background: #f3f4f6;
    }

    .participant-checkbox input[type="checkbox"] {
        width: 16px;
        height: 16px;
        cursor: pointer;
    }

    .participant-checkbox label {
        cursor: pointer;
        margin: 0;
        flex: 1;
        user-select: none;
    }

    .participants-count {
        color: #667eea;
        font-weight: 600;
    }