html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Custom Styles for Lunar Calendar Converter */
.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.card {
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2) !important;
}

.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.results-table {
    font-size: 0.95rem;
}

.results-table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 15px 10px;
}

.results-table tbody td {
    padding: 15px 10px;
    vertical-align: middle;
}

.results-table tbody tr {
    transition: all 0.2s ease;
}

.results-table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
    transform: scale(1.01);
}

.zodiac-badge {
    display: inline-block;
    padding: 5px 12px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.badge {
    padding: 8px 15px;
    font-weight: 500;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        margin-top: 1rem;
        margin-bottom: 1rem;
        border-radius: 10px;
    }

    .display-4 {
        font-size: 2rem;
    }

    .card-body {
        padding: 1.5rem !important;
    }

    .results-table {
        font-size: 0.85rem;
    }

    .results-table thead th {
        font-size: 0.75rem;
        padding: 10px 5px;
    }

    .results-table tbody td {
        padding: 10px 5px;
    }

    .badge {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .zodiac-badge {
        font-size: 0.8rem;
        padding: 4px 8px;
    }

    /* Stack table on mobile for better readability */
    @media (max-width: 576px) {
        .results-table thead {
            display: none;
        }

        .results-table tbody tr {
            display: block;
            margin-bottom: 1rem;
            border: 1px solid #dee2e6;
            border-radius: 10px;
            padding: 10px;
            background: white;
        }

        .results-table tbody td {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 10px;
            border: none;
            text-align: left !important;
        }

        .results-table tbody td::before {
            content: attr(data-label);
            font-weight: bold;
            margin-right: 10px;
        }

        .results-table tbody td:nth-child(1)::before {
            content: "年份：";
        }

        .results-table tbody td:nth-child(2)::before {
            content: "日期：";
        }

        .results-table tbody td:nth-child(3)::before {
            content: "类型：";
        }

        .results-table tbody td:nth-child(4)::before {
            content: "星期：";
        }

        .results-table tbody td:nth-child(5)::before {
            content: "星座：";
        }
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease;
}

/* Bootstrap Icons support */
.bi {
    vertical-align: -0.125em;
}
