/* 账胜财税网站自定义样式 */

/* 基础样式重置 */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 自定义动画 */
@@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@@keyframes slideInDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

@@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

@@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 动画类 */
.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.animate-slide-in-up {
    animation: slideInUp 0.5s ease-out;
}

.animate-slide-in-down {
    animation: slideInDown 0.5s ease-out;
}

.animate-zoom-in {
    animation: zoomIn 0.5s ease-out;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-fade-out {
    animation: fadeIn 0.3s ease-in-out reverse;
}

/* 延迟动画 */
.animate-delay-100 {
    animation-delay: 0.1s;
}

.animate-delay-200 {
    animation-delay: 0.2s;
}

.animate-delay-300 {
    animation-delay: 0.3s;
}

.animate-delay-500 {
    animation-delay: 0.5s;
}

.animate-delay-700 {
    animation-delay: 0.7s;
}

.animate-delay-1000 {
    animation-delay: 1s;
}

/* 渐变背景 */
.gradient-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.gradient-dark {
    background: linear-gradient(135deg, #374151 0%, #111827 100%);
}

/* 阴影效果 */
.shadow-soft {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.shadow-medium {
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.12);
}

.shadow-strong {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.16);
}

.shadow-colored {
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

/* 悬停效果 */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

/* 按钮样式 */
.btn-primary {
    @@apply bg-green-600 text-white px-6 py-3 rounded-lg font-semibold transition-all duration-200 hover:bg-green-700 hover:shadow-lg;
}

.btn-secondary {
    @@apply bg-blue-600 text-white px-6 py-3 rounded-lg font-semibold transition-all duration-200 hover:bg-blue-700 hover:shadow-lg;
}

.btn-outline {
    @@apply border-2 border-green-600 text-green-600 px-6 py-3 rounded-lg font-semibold transition-all duration-200 hover:bg-green-600 hover:text-white;
}

.btn-ghost {
    @@apply text-green-600 px-6 py-3 rounded-lg font-semibold transition-all duration-200 hover:bg-green-50;
}

.btn-danger {
    @@apply bg-red-600 text-white px-6 py-3 rounded-lg font-semibold transition-all duration-200 hover:bg-red-700 hover:shadow-lg;
}

.btn-warning {
    @@apply bg-yellow-600 text-white px-6 py-3 rounded-lg font-semibold transition-all duration-200 hover:bg-yellow-700 hover:shadow-lg;
}

.btn-success {
    @@apply bg-green-600 text-white px-6 py-3 rounded-lg font-semibold transition-all duration-200 hover:bg-green-700 hover:shadow-lg;
}

.btn-info {
    @@apply bg-blue-500 text-white px-6 py-3 rounded-lg font-semibold transition-all duration-200 hover:bg-blue-600 hover:shadow-lg;
}

/* 卡片样式 */
.card {
    @@apply bg-white rounded-xl shadow-md overflow-hidden transition-all duration-300;
}

.card-hover {
    @@apply hover:shadow-lg hover:-translate-y-1;
}

.card-bordered {
    @@apply border border-gray-200;
}

/* 表单样式 */
.form-input {
    @@apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent transition-all duration-200;
}

.form-textarea {
    @@apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent transition-all duration-200 resize-vertical;
}

.form-select {
    @@apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent transition-all duration-200 bg-white;
}

.form-checkbox {
    @@apply h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300 rounded;
}

.form-radio {
    @@apply h-4 w-4 text-green-600 focus:ring-green-500 border-gray-300;
}

/* 标签样式 */
.badge {
    @@apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.badge-primary {
    @@apply bg-green-100 text-green-800;
}

.badge-secondary {
    @@apply bg-blue-100 text-blue-800;
}

.badge-success {
    @@apply bg-green-100 text-green-800;
}

.badge-warning {
    @@apply bg-yellow-100 text-yellow-800;
}

.badge-danger {
    @@apply bg-red-100 text-red-800;
}

.badge-info {
    @@apply bg-blue-100 text-blue-800;
}

.badge-gray {
    @@apply bg-gray-100 text-gray-800;
}

/* 导航样式 */
.nav-link {
    @@apply text-gray-700 hover:text-green-600 px-3 py-2 rounded-md text-sm font-medium transition-colors duration-200;
}

.nav-link-active {
    @@apply text-green-600 bg-green-50;
}

/* 分页样式 */
.pagination-btn {
    @@apply px-3 py-2 border border-gray-300 rounded text-sm hover:bg-gray-50 transition-colors duration-200;
}

.pagination-btn-active {
    @@apply bg-green-600 text-white border-green-600;
}

/* 表格样式 */
.table {
    @@apply min-w-full divide-y divide-gray-200;
}

.table-header {
    @@apply px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider bg-gray-50;
}

.table-cell {
    @@apply px-6 py-4 whitespace-nowrap text-sm text-gray-900;
}

.table-row {
    @@apply hover:bg-gray-50 transition-colors duration-200;
}

/* 模态框样式 */
.modal-overlay {
    @@apply fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full z-50;
}

.modal-content {
    @@apply relative top-10 mx-auto p-5 border shadow-lg rounded-md bg-white;
}

/* 工具提示样式 */
.tooltip {
    @@apply absolute bg-gray-800 text-white text-xs px-2 py-1 rounded shadow-lg z-50;
}

/* 加载动画 */
.loading-spinner {
    @@apply inline-block w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* 进度条 */
.progress-bar {
    @@apply w-full bg-gray-200 rounded-full h-2;
}

.progress-fill {
    @@apply bg-green-600 h-2 rounded-full transition-all duration-300;
}

/* 分割线 */
.divider {
    @@apply border-t border-gray-200 my-6;
}

.divider-vertical {
    @@apply border-l border-gray-200 mx-6;
}

/* 响应式隐藏 */
@@media (max-width: 640px) {
    .hidden-mobile {
        display: none !important;
    }
}

@@media (min-width: 641px) and (max-width: 1024px) {
    .hidden-tablet {
        display: none !important;
    }
}

@@media (min-width: 1025px) {
    .hidden-desktop {
        display: none !important;
    }
}

/* 打印样式 */
@@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-after: always;
    }
    
    .print-break-before {
        page-break-before: always;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .shadow-md,
    .shadow-lg,
    .shadow-xl {
        box-shadow: none !important;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 选择文本样式 */
::selection {
    background-color: rgba(16, 185, 129, 0.3);
    color: inherit;
}

::-moz-selection {
    background-color: rgba(16, 185, 129, 0.3);
    color: inherit;
}

/* 焦点样式 */
.focus-visible:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* 无障碍样式 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 自定义工具类 */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-shadow-lg {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.backdrop-blur {
    backdrop-filter: blur(8px);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

.backdrop-blur-lg {
    backdrop-filter: blur(16px);
}

/* 图片样式 */
.img-responsive {
    max-width: 100%;
    height: auto;
}

.img-circle {
    border-radius: 50%;
}

.img-rounded {
    border-radius: 0.5rem;
}

/* 文本省略 */
.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-ellipsis-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-ellipsis-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 居中布局 */
.center-absolute {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.center-flex {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 粘性定位 */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 40;
}

.sticky-bottom {
    position: sticky;
    bottom: 0;
    z-index: 40;
}

/* 全屏覆盖 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
}

/* 网格布局辅助 */
.grid-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-auto-fill {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}