/* bmibmr — 頁面樣式（/bmibmr.css） */
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,600,700|Montserrat:400,700');

body.page-bmibmr {
  font-family: 'Microsoft JhengHei', Arial, sans-serif;
  background: var(--bg-main);
  background-image: none;
  min-height: 100vh;
  color: var(--text);
}

* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
      
        
        /* Main Content */
        .container {
            max-width: 1000px;
            margin: 0 auto;
            padding: 1.5rem 1rem;
        }
        
        .card {
            background: white;
            border-radius: 1rem;
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
            padding: 2rem 1.5rem;
            margin-bottom: 1.5rem;
        }
        
        .card-title {
            font-size: 1.75rem;
            font-weight: bold;
            text-align: center;
            margin-bottom: 0.5rem;
            color: #1f2937;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .card-subtitle {
            text-align: center;
            color: #6b7280;
            font-size: 0.95rem;
            margin-bottom: 2rem;
        }
        
        .unit-toggle {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin-bottom: 2rem;
        }
        
        .unit-btn {
            padding: 0.75rem 2rem;
            border: 2px solid #667eea;
            background: white;
            color: #667eea;
            border-radius: 0.5rem;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .unit-btn.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            transform: scale(1.05);
        }
        
        .unit-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
        
        .gender-selector {
            display: flex;
            gap: 1rem;
            justify-content: center;
            margin-bottom: 2rem;
        }
        
        .gender-option {
            flex: 1;
            max-width: 200px;
            padding: 1rem;
            border: 2px solid #d1d5db;
            border-radius: 0.75rem;
            cursor: pointer;
            transition: all 0.3s;
            text-align: center;
        }
        
        .gender-option:hover {
            border-color: #667eea;
            transform: translateY(-2px);
        }
        
        .gender-option.selected {
            border-color: #667eea;
            background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
        }
        
        .gender-icon {
            font-size: 2.5rem;
            margin-bottom: 0.5rem;
        }
        
        .gender-label {
            font-size: 1rem;
            font-weight: 600;
            color: #374151;
        }
        
        .input-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
            margin-bottom: 2rem;
        }
        
        .input-group {
            grid-column: span 2;
        }
        
        .input-group.half {
            grid-column: span 1;
        }
        
        .input-group label {
            display: block;
            font-size: 0.95rem;
            font-weight: 600;
            color: #374151;
            margin-bottom: 0.5rem;
        }
        
        .input-wrapper {
            position: relative;
        }
        
        .input-group input[type="number"] {
            width: 100%;
            padding: 0.75rem 3rem 0.75rem 1rem;
            font-size: 1.125rem;
            border: 2px solid #d1d5db;
            border-radius: 0.5rem;
            transition: all 0.3s;
            font-weight: 600;
            color: #1f2937;
        }
        
        .input-group input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }
        
        .input-icon {
            position: absolute;
            right: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: #9ca3af;
            font-size: 0.875rem;
            font-weight: 600;
            pointer-events: none;
        }
        
        .calculate-btn {
            padding: 1rem 3rem;
            font-size: 1.25rem;
            font-weight: bold;
            color: white;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            border-radius: 0.75rem;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            font-family: 'Montserrat', 'Microsoft JhengHei', sans-serif;
        }
        
        .calculate-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0,0,0,0.15);
        }
        
        .calculate-btn:active {
            transform: translateY(0);
        }

        /* Results Section */
        .results-container {
            display: none;
            margin-top: 2rem;
        }

        .results-container.active {
            display: block;
            animation: fadeIn 0.5s ease-in;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .results-header {
            text-align: center;
            padding: 1.5rem;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 0.75rem 0.75rem 0 0;
            margin-bottom: 0;
        }

        .results-header h3 {
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
        }

        .results-header p {
            font-size: 0.9rem;
            opacity: 0.9;
        }

        .input-summary {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 1rem;
            padding: 1.5rem;
            background: #f9fafb;
            border-bottom: 2px solid #e5e7eb;
        }

        .summary-item {
            text-align: center;
        }

        .summary-value {
            font-size: 1.5rem;
            font-weight: bold;
            color: #667eea;
            display: block;
        }

        .summary-label {
            font-size: 0.85rem;
            color: #6b7280;
            margin-top: 0.25rem;
        }

        .results-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            padding: 1.5rem;
            background: white;
            border-radius: 0 0 0.75rem 0.75rem;
        }

        .result-box {
            background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
            border-radius: 0.75rem;
            padding: 1.5rem 1rem;
            text-align: center;
            border: 2px solid #d1d5db;
            transition: all 0.3s;
        }

        .result-box:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }

        .result-box.highlight {
            background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
            border-color: #ef4444;
        }

        .result-box.warning {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            border-color: #f59e0b;
        }

        .result-number {
            font-size: 2.5rem;
            font-weight: bold;
            color: #1f2937;
            font-family: 'Montserrat', sans-serif;
            margin-bottom: 0.5rem;
        }

        .result-box.highlight .result-number {
            color: #dc2626;
        }

        .result-box.warning .result-number {
            color: #d97706;
        }

        .result-label {
            font-size: 0.85rem;
            color: #4b5563;
            font-weight: 600;
            text-transform: uppercase;
            margin-bottom: 0.25rem;
        }

        .result-sublabel {
            font-size: 0.75rem;
            color: #6b7280;
        }

        .warning-box {
            margin-top: 1.5rem;
            padding: 1rem 1.5rem;
            background: #fef3c7;
            border-left: 4px solid #f59e0b;
            border-radius: 0.5rem;
        }

        .warning-box strong {
            color: #92400e;
        }

        /* Info Box */
        .info-box {
            background: white;
            border-radius: 1rem;
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
            padding: 2rem 1.5rem;
            margin-bottom: 1.5rem;
        }

        .info-box h3 {
            font-size: 1.5rem;
            font-weight: bold;
            color: #1f2937;
            margin-bottom: 1.5rem;
            text-align: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .info-content {
            color: #4b5563;
            line-height: 1.8;
        }

        .info-content h4 {
            font-size: 1.125rem;
            font-weight: 600;
            color: #1f2937;
            margin: 1.5rem 0 0.75rem 0;
        }

        .info-content p {
            margin-bottom: 1rem;
        }

        .info-content ul {
            margin-left: 1.5rem;
            margin-bottom: 1rem;
        }

        .info-content li {
            margin: 0.5rem 0;
        }

        .info-content strong {
            color: #667eea;
            font-weight: 600;
        }

        .formula-box {
            background: #f9fafb;
            border-left: 4px solid #667eea;
            padding: 1rem 1.5rem;
            margin: 1rem 0;
            border-radius: 0.5rem;
            font-family: 'Courier New', monospace;
        }

        .tip-box {
            background: #d1fae5;
            border-left: 4px solid #10b981;
            padding: 1rem 1.5rem;
            margin: 1rem 0;
            border-radius: 0.5rem;
        }

        .danger-box {
            background: #fee2e2;
            border-left: 4px solid #ef4444;
            padding: 1rem 1.5rem;
            margin: 1rem 0;
            border-radius: 0.5rem;
        }

        .hero {
            text-align: center;
            color: var(--text);
            margin-bottom: 3rem;
            padding: 2rem 1rem;
        }

        .hero h1 {
            font-size: 3rem;
            margin-bottom: 1rem;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
        }

        .hero p {
            font-size: 1.2rem;
            opacity: 0.9;
        }

        .hero img {
            max-width: 30px;
            height: auto;
            vertical-align: middle;
        }

        .hero a {
            display: inline-block;
            background: white;
            padding: 1rem 2rem;
            border-radius: 0.75rem;
            text-decoration: none;
            color: #667eea;
            font-weight: bold;
            font-size: 1.125rem;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: all 0.3s;
            margin-bottom: 2rem;
        }

        .hero a:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0,0,0,0.15);
        }

        .calculator-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 2rem;
            margin-top: 2rem;
        }
        

        .calculator-card {
            background: #eae6dd;
            border-radius: 15px;
            padding: 1rem;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .calculator-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 40px rgba(0,0,0,0.3);
        }
.calculator-card a {
    text-decoration: none; /* 去除底線 */
    font-weight: bold;     /* 粗體 */
    color: #222;           /* 顏色 #222 */
}
   .calculator-card h3 {
            color: #222;
            margin-bottom: 1rem;
            font-size: 1rem;
        }

        .calculator-card p {
            color: #666;
            line-height: 1;
        }

        .icon {
            font-size: 2rem;
            margin-bottom: 0rem;
        }

        /* Responsive Design */
        @media (max-width: 640px) {
            .input-grid {
                grid-template-columns: 1fr;
            }

            .input-group,
            .input-group.half {
                grid-column: span 1;
            }

            .gender-selector {
                flex-direction: column;
            }

            .gender-option {
                max-width: 100%;
            }

            .unit-toggle {
                flex-direction: column;
            }

            .result-number {
                font-size: 2rem;
            }
        }

        @media (min-width: 640px) {
            .card {
                padding: 2.5rem 2rem;
            }

            .card-title {
                font-size: 2rem;
            }
        }

        @media (min-width: 768px) {
            .container {
                padding: 2.5rem 1.5rem;
            }
        }