@font-face {
    font-family: 'UyghurFont';
    src: url('fonts/tuztom.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'UyghurFont';
    src: url('fonts/tuztom1.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'UyghurFont', Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* Dark Mode */
body.dark-mode {
    background: #1a1a2e;
    color: #eaeaea;
}

body.dark-mode .card {
    background: rgba(26, 26, 46, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 0, 0, 0.2);
}

body.dark-mode .card h1 {
    color: #eaeaea;
}

body.dark-mode .form-group label {
    color: #ccc;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
    background: rgba(40, 40, 60, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    color: #eaeaea;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
    background: rgba(40, 40, 60, 1);
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2), 0 8px 25px rgba(102, 126, 234, 0.3);
}

body.dark-mode .header {
    background: rgba(26, 26, 46, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .header h1 {
    color: #eaeaea;
}

body.dark-mode #currentUser {
    color: #ccc;
}

body.dark-mode .stat-card {
    background: rgba(26, 26, 46, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

body.dark-mode .stat-info h3 {
    color: #ccc;
}

body.dark-mode .category-stats {
    background: rgba(26, 26, 46, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .category-stats h3 {
    color: #eaeaea;
}

body.dark-mode .stats-tab,
body.dark-mode .filter-tab,
body.dark-mode .category-tab {
    background: rgba(40, 40, 60, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    color: #eaeaea;
}

body.dark-mode .stats-tab:hover,
body.dark-mode .filter-tab:hover,
body.dark-mode .category-tab:hover {
    border-color: rgba(102, 126, 234, 0.4);
}

body.dark-mode .category-item {
    background: rgba(40, 40, 60, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .category-percent {
    color: #aaa;
}

body.dark-mode .transactions {
    background: rgba(26, 26, 46, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .transactions h3 {
    color: #eaeaea;
}

body.dark-mode .transaction-item {
    background: rgba(40, 40, 60, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .transaction-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

body.dark-mode .transaction-info h4 {
    color: #eaeaea;
}

body.dark-mode .transaction-info p {
    color: #aaa;
}

body.dark-mode .modal-content {
    background: rgba(26, 26, 46, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .modal-header h2 {
    color: #eaeaea;
}

body.dark-mode .close {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .close:hover {
    background: rgba(235, 51, 73, 0.1);
}

body.dark-mode .category-manage-item {
    background: rgba(40, 40, 60, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .category-manage-name {
    color: #eaeaea;
}

body.dark-mode .empty-state {
    color: #666;
}

body.dark-mode ::-webkit-scrollbar-track {
    background: #1a1a2e;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: #4a4a6a;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #5a5a7a;
}

body.dark-mode ::selection {
    background: rgba(102, 126, 234, 0.3);
    color: #eaeaea;
}

/* Theme Toggle Button */
.btn-theme {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 14px;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.btn-theme:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-theme:active {
    transform: translateY(-1px) scale(1.05);
}

@keyframes backgroundFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

#app {
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    width: 100%;
}

/* Login Section */
#loginSection {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 40px);
}

.card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(255, 154, 158, 0.25), 0 0 40px rgba(254, 207, 239, 0.2);
    width: 100%;
    max-width: 400px;
    border: 2px solid rgba(255, 154, 158, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(255, 154, 158, 0.35), 0 0 50px rgba(254, 207, 239, 0.3);
}

.card h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    font-family: 'UyghurFont', Arial, sans-serif;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2), 0 8px 25px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 30px;
    font-family: 'UyghurFont', Arial, sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-weight: bold;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 20px rgba(102, 126, 234, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Glowing effect */
.btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(255, 255, 255, 0.3) 90deg,
        transparent 180deg,
        rgba(255, 255, 255, 0.3) 270deg,
        transparent 360deg
    );
    animation: rotate 3s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.btn:hover::before {
    opacity: 1;
}

/* Ripple effect */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.8s, height 0.8s, opacity 0.8s;
    opacity: 0;
}

.btn:hover::after {
    width: 400px;
    height: 400px;
    opacity: 0.6;
}

.btn:hover {
    transform: translateY(-5px) scale(1.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 30px rgba(102, 126, 234, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn:active {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), 0 0 20px rgba(102, 126, 234, 0.3);
}

/* Shine effect */
.btn span {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 50%, #495057 100%);
    color: white;
    width: 100%;
    box-shadow: 0 6px 25px rgba(108, 117, 125, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 50%, #6c757d 100%);
    box-shadow: 0 10px 35px rgba(108, 117, 125, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 50%, #0ba360 100%);
    color: white;
    box-shadow: 0 6px 25px rgba(17, 153, 142, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg, #38ef7d 0%, #0ba360 50%, #11998e 100%);
    box-shadow: 0 10px 35px rgba(17, 153, 142, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 50%, #ff6b6b 100%);
    color: white;
    box-shadow: 0 6px 25px rgba(235, 51, 73, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f45c43 0%, #ff6b6b 50%, #eb3349 100%);
    box-shadow: 0 10px 35px rgba(235, 51, 73, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 50%, #495057 100%);
    color: white;
    box-shadow: 0 6px 25px rgba(108, 117, 125, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-info:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 50%, #6c757d 100%);
    box-shadow: 0 10px 35px rgba(108, 117, 125, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 50%, #495057 100%);
    color: white;
    box-shadow: 0 6px 25px rgba(108, 117, 125, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 50%, #6c757d 100%);
    box-shadow: 0 10px 35px rgba(108, 117, 125, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-outline {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    border: 2px solid rgba(255, 0, 0, 0.5);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(255, 255, 255, 0.4) 90deg,
        transparent 180deg,
        rgba(255, 255, 255, 0.4) 270deg,
        transparent 360deg
    );
    animation: rotate 3s linear infinite;
    opacity: 0.5;
}

.btn-outline:hover {
    background: linear-gradient(135deg, #ff3333 0%, #cc0000 100%);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 35px rgba(255, 0, 0, 0.7);
    transform: translateY(-3px) scale(1.05);
}

.btn-outline:hover::before {
    opacity: 1;
}

.btn-link {
    background: transparent;
    border: none;
    color: #667eea;
    text-decoration: none;
    margin-top: 10px;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    font-weight: 600;
}

.btn-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: translateX(-50%);
    transition: width 0.3s;
}

.btn-link:hover::after {
    width: 100%;
}

.btn-link:hover {
    color: #764ba2;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

/* Dashboard */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.header h1 {
    color: #333;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

#currentUser {
    color: #666;
    font-weight: bold;
}

/* Stats */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 40px rgba(255, 154, 158, 0.2);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 2px solid rgba(255, 154, 158, 0.15);
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(255, 154, 158, 0.3);
}

.stat-icon {
    font-size: 40px;
}

.stat-info h3 {
    color: #666;
    margin-bottom: 5px;
}

.stat-info p {
    font-size: 24px;
    font-weight: bold;
}

.stat-card.income .stat-info p {
    color: #11998e;
}

.stat-card.expense .stat-info p {
    color: #eb3349;
}

.stat-card.balance .stat-info p {
    color: #667eea;
}

/* Category Stats */
.category-stats {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.category-stats h3 {
    color: #333;
    margin-bottom: 20px;
}

.stats-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.stats-tab {
    padding: 12px 24px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-family: 'UyghurFont', Arial, sans-serif;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.stats-tab::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.stats-tab:hover::before {
    width: 300px;
    height: 300px;
}

.stats-tab:hover {
    border-color: rgba(102, 126, 234, 0.6);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
}

.stats-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-3px);
}

.stats-tab.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #667eea;
    transform: translateX(-50%);
}

.category-chart {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.category-item {
    flex: 1 1 calc(50% - 15px);
    min-width: 200px;
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.category-item:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.category-item-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-color {
    width: 20px;
    height: 20px;
    border-radius: 5px;
}

.category-amount {
    font-weight: bold;
    font-size: 18px;
}

.category-percent {
    color: #666;
    font-size: 14px;
}

/* Actions */
.actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.actions .btn {
    padding: 16px 20px;
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Pulse animation for action buttons */
.actions .btn {
    animation: pulse 2s ease-in-out infinite;
}

.actions .btn:hover {
    animation-play-state: paused;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 0 10px rgba(102, 126, 234, 0);
    }
}

/* Neon effect on focus */
.btn:focus {
    outline: none;
    animation: neon 1.5s ease-in-out infinite alternate;
}

@keyframes neon {
    from {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 10px rgba(102, 126, 234, 0.5), 0 0 20px rgba(102, 126, 234, 0.3), 0 0 30px rgba(102, 126, 234, 0.1);
    }
    to {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 20px rgba(102, 126, 234, 0.8), 0 0 30px rgba(102, 126, 234, 0.5), 0 0 40px rgba(102, 126, 234, 0.3);
    }
}

/* Transactions */
.transactions {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.transactions h3 {
    color: #333;
    margin-bottom: 20px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-tab {
    padding: 12px 24px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-family: 'UyghurFont', Arial, sans-serif;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.filter-tab::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.filter-tab:hover::before {
    width: 300px;
    height: 300px;
}

.filter-tab:hover {
    border-color: rgba(102, 126, 234, 0.6);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
}

.filter-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-3px);
}

.filter-tab.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #667eea;
    transform: translateX(-50%);
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.15);
    border: 2px solid rgba(255, 154, 158, 0.2);
    cursor: pointer;
}

.transaction-item:hover {
    transform: translateX(-8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 154, 158, 0.25);
}

.transaction-item.income {
    border-right: 4px solid #11998e;
}

.transaction-item.expense {
    border-right: 4px solid #eb3349;
}

.transaction-info h4 {
    color: #333;
    margin-bottom: 5px;
}

.transaction-info p {
    color: #666;
    font-size: 14px;
}

.transaction-amount {
    text-align: left;
}

.transaction-amount .amount {
    font-size: 20px;
    font-weight: bold;
}

.transaction-amount.income .amount {
    color: #11998e;
}

.transaction-amount.expense .amount {
    color: #eb3349;
}

.transaction-actions {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.action-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'UyghurFont', Arial, sans-serif;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.action-btn:hover::before {
    width: 150px;
    height: 150px;
}

.action-btn:hover {
    transform: translateY(-2px) scale(1.08);
}

.action-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.btn-edit {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(108, 117, 125, 0.3);
}

.btn-edit:hover {
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
    background: linear-gradient(135deg, #5a6268 0%, #6c757d 100%);
}

.btn-delete {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.4);
}

.btn-delete:hover {
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.6);
    background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 2px solid #e0e0e0;
}

.modal-header h2 {
    color: #333;
}

.close {
    font-size: 30px;
    cursor: pointer;
    color: #999;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
}

.close:hover {
    color: #eb3349;
    background: rgba(235, 51, 73, 0.1);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 15px rgba(235, 51, 73, 0.2);
}

.close:active {
    transform: rotate(90deg) scale(0.95);
}

.modal-body {
    padding: 25px;
}

/* History */
.history-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.history-filters .form-group {
    flex: 1;
    min-width: 150px;
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Category Management */
.category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.category-tab {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    font-family: 'UyghurFont', Arial, sans-serif;
    transition: all 0.3s;
}

.category-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.categories-list {
    max-height: 400px;
    overflow-y: auto;
}

.category-manage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(10px);
    margin-bottom: 12px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.category-manage-item:hover {
    transform: translateX(-8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.category-manage-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-manage-color {
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.category-manage-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.category-manage-actions {
    display: flex;
    gap: 10px;
}

.category-actions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.category-tabs {
    flex: 1;
    display: flex;
    gap: 10px;
}

.category-tab {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    font-family: 'UyghurFont', Arial, sans-serif;
    transition: all 0.3s;
    min-width: 120px;
}

.btn-small {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.btn-small::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-small:hover::before {
    width: 200px;
    height: 200px;
}

.btn-small:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 14px;
    }

    #app {
        max-width: 100%;
    }

    /* Login Section */
    #loginSection {
        min-height: calc(100vh - 20px);
    }

    .card {
        padding: 25px;
        max-width: 100%;
        border-radius: 20px;
    }

    .card h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 14px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    /* Dashboard */
    .header {
        padding: 15px 20px;
        border-radius: 20px;
        flex-direction: column;
        gap: 10px;
    }

    .header h1 {
        font-size: 20px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .btn-outline {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* Stats */
    .stats-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 18px 20px;
        border-radius: 18px;
    }

    .stat-icon {
        font-size: 32px;
    }

    .stat-info h3 {
        font-size: 14px;
    }

    .stat-info p {
        font-size: 18px;
    }

    /* Category Stats */
    .category-stats {
        padding: 20px;
        border-radius: 20px;
        margin-bottom: 20px;
    }

    .category-stats h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .stats-tabs {
        margin-bottom: 15px;
    }

    .stats-tab {
        padding: 10px 18px;
        font-size: 13px;
        border-radius: 18px;
    }

    .category-item {
        flex: 1 1 100%;
        padding: 14px 16px;
        border-radius: 15px;
    }

    .category-amount {
        font-size: 16px;
    }

    .category-percent {
        font-size: 12px;
    }

    /* Actions */
    .actions {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 20px;
    }

    .actions .btn {
        padding: 14px 18px;
        font-size: 15px;
        border-radius: 25px;
    }

    /* Transactions */
    .transactions {
        padding: 20px;
        border-radius: 20px;
    }

    .transactions h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .filter-tabs {
        margin-bottom: 15px;
    }

    .filter-tab {
        padding: 10px 18px;
        font-size: 13px;
        border-radius: 18px;
    }

    .transaction-item {
        padding: 14px 16px;
        border-radius: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .transaction-item:hover {
        transform: translateX(-3px) scale(1.01);
    }

    .transaction-info {
        width: 100%;
    }

    .transaction-info h4 {
        font-size: 15px;
    }

    .transaction-info p {
        font-size: 13px;
    }

    .transaction-amount {
        width: 100%;
        text-align: right;
    }

    .transaction-amount .amount {
        font-size: 18px;
    }

    .transaction-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .action-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        border-radius: 25px;
        max-height: 85vh;
    }

    .modal-header {
        padding: 18px 20px;
    }

    .modal-header h2 {
        font-size: 18px;
    }

    .close {
        width: 35px;
        height: 35px;
        font-size: 26px;
    }

    .modal-body {
        padding: 18px 20px;
    }

    /* History */
    .history-filters {
        flex-direction: column;
        gap: 10px;
    }

    .history-filters .form-group {
        min-width: 100%;
    }

    .history-list {
        max-height: 350px;
    }

    /* Category Management */
    .category-tabs {
        margin-bottom: 15px;
    }

    .category-tab {
        padding: 10px;
        font-size: 13px;
        min-width: 100px;
        border-radius: 15px;
    }

    .category-actions-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .categories-list {
        max-height: 350px;
    }

    .category-manage-item {
        padding: 14px 16px;
        border-radius: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .category-manage-info {
        width: 100%;
    }

    .category-manage-name {
        font-size: 16px;
    }

    .category-manage-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .btn-small {
        padding: 8px 14px;
        font-size: 12px;
    }

    /* Empty State */
    .empty-state {
        padding: 30px;
    }

    .empty-state-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }
}

/* Extra small phones */
@media (max-width: 360px) {
    .card {
        padding: 20px;
    }

    .header h1 {
        font-size: 18px;
    }

    .stat-card {
        padding: 15px 18px;
    }

    .actions .btn {
        font-size: 14px;
        padding: 12px 16px;
    }

    .transaction-item {
        padding: 12px 14px;
    }

    .modal-content {
        width: 98%;
        border-radius: 20px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

::selection {
    background: rgba(102, 126, 234, 0.3);
    color: #333;
}

/* Rain Effect Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 230px 80px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(2px 2px at 300px 150px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 350px 60px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 420px 180px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 500px 100px, rgba(255, 255, 255, 0.3), transparent);
    background-size: 550px 200px;
    animation: rain 1s linear infinite;
}

@keyframes rain {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 550px 200px;
    }
}

/* Floating Bubbles Animation */
.floating-bubble {
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 154, 158, 0.3), rgba(254, 207, 239, 0.2), transparent);
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
    box-shadow: 0 0 20px rgba(255, 154, 158, 0.2);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0.2;
    }
    25% {
        transform: translateY(-30px) rotate(90deg) scale(1.1);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-60px) rotate(180deg) scale(1.2);
        opacity: 0.6;
    }
    75% {
        transform: translateY(-30px) rotate(270deg) scale(1.1);
        opacity: 0.4;
    }
}

/* Cherry Blossom Theme Colors */
:root {
    --cherry-blossom-pink: #ff9a9e;
    --cherry-blossom-light: #fecfef;
    --cherry-blossom-rose: #ffdde1;
    --cherry-blossom-deep: #ff6b9d;
}

