/* Reset ve Temel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    background: #1a1a1a;
    position: relative;
    padding-bottom: 100px; /* FAB için alan */
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #333;
    margin-bottom: 30px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 500;
}

.user-info i {
    font-size: 24px;
    color: #4CAF50;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-export {
    background: #4CAF50;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-export:hover {
    background: #45a049;
    transform: scale(1.1);
}

.btn-stats {
    background: #ff9800;
    color: white;
    text-decoration: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-stats:hover {
    background: #f57c00;
    transform: scale(1.1);
}

.logout-btn {
    color: #ff6b6b;
    text-decoration: none;
    font-size: 20px;
    transition: color 0.3s;
}

.logout-btn:hover {
    color: #ff5252;
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.balance-header h2 {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.9;
}

.balance-header i {
    font-size: 24px;
    opacity: 0.8;
}

.balance-amount {
    font-size: 36px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.summary-card {
    background: #2d2d2d;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #333;
    transition: transform 0.3s, box-shadow 0.3s;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.summary-card.income {
    border-left: 4px solid #4CAF50;
}

.summary-card.expense {
    border-left: 4px solid #f44336;
}

.summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.summary-card.income .summary-icon {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.summary-card.expense .summary-icon {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.summary-content h3 {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 5px;
}

.summary-content p {
    font-size: 18px;
    font-weight: 600;
}

/* Debt Status */
.debt-status {
    background: #2d2d2d;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #333;
}

.debt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.debt-header h3 {
    font-size: 18px;
    color: #ffffff;
    margin: 0;
}

.btn-view-all {
    background: #667eea;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.btn-view-all:hover {
    background: #764ba2;
    transform: translateY(-1px);
}

.debt-section {
    background: #2d2d2d;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #333;
}

.debt-section h2 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #ffffff;
}

.debt-item.pending {
    border-left: 4px solid #ff9800;
}

.debt-item.approved {
    border-left: 4px solid #4CAF50;
}

.debt-info {
    flex: 1;
}

.debt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.debt-header h3 {
    font-size: 16px;
    color: #ffffff;
    margin: 0;
}

.debt-details {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.4;
}

.debt-details p {
    margin: 5px 0;
}

.debt-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-approve {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.btn-approve:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.btn-reject {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.btn-reject:hover {
    background: #da190b;
    transform: translateY(-1px);
}

.back-btn {
    color: #667eea;
    text-decoration: none;
    font-size: 20px;
    margin-right: 15px;
    transition: color 0.3s;
}

.back-btn:hover {
    color: #764ba2;
}

.debt-list {
    space-y: 10px;
}

.debt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid #333;
}

.debt-user {
    font-weight: 500;
}

.debt-amount {
    font-weight: 600;
    font-size: 16px;
}

.debt-amount.positive {
    color: #4CAF50;
}

.debt-amount.negative {
    color: #f44336;
}

.no-debt {
    text-align: center;
    opacity: 0.7;
    font-style: italic;
}

/* Recent Expenses */
.recent-expenses {
    background: #2d2d2d;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #333;
}

.recent-expenses h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #ffffff;
}

.expense-list {
    space-y: 10px;
}

.expense-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid #333;
    transition: transform 0.3s;
}

.expense-item:hover {
    transform: translateX(5px);
}

.expense-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.expense-details {
    flex: 1;
}

.expense-details h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #ffffff;
}

.expense-details p {
    font-size: 14px;
    opacity: 0.7;
}

.expense-amount {
    font-size: 16px;
    font-weight: 600;
    color: #f44336;
}

.no-expenses {
    text-align: center;
    opacity: 0.7;
    font-style: italic;
    padding: 20px;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
}

.fab:active {
    transform: scale(0.95);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #2d2d2d;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #333;
}

.modal-header h3 {
    font-size: 20px;
    color: #ffffff;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #ffffff;
}

/* Form Styles */
form {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #ffffff;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #444;
    border-radius: 10px;
    background: #1a1a1a;
    color: #ffffff;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

.category-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.category-input-group select {
    flex: 1;
}

.btn-add-category {
    background: #667eea;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-add-category:hover {
    background: #764ba2;
    transform: scale(1.1);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-link {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
    transition: color 0.3s;
}

.btn-link:hover {
    color: #764ba2;
}

/* Login Page Styles */
.login-page {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: #2d2d2d;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #ffffff;
}

.login-header p {
    opacity: 0.7;
    font-size: 14px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.login-footer p {
    display: inline;
    margin-right: 10px;
    opacity: 0.7;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    color: #f44336;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4CAF50;
    color: #4CAF50;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .balance-card {
        padding: 20px;
    }
    
    .balance-amount {
        font-size: 28px;
    }
    
    .summary-cards {
        gap: 10px;
    }
    
    .summary-card {
        padding: 15px;
    }
    
    .fab {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .login-card {
        padding: 30px 20px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Statistics Page Styles */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: #2d2d2d;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #333;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.stat-content h3 {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 5px;
}

.stat-content p {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.chart-section {
    background: #2d2d2d;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #333;
}

.chart-section h2 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #ffffff;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.top-categories {
    background: #2d2d2d;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #333;
}

.top-categories h2 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #ffffff;
}

.category-list {
    space-y: 15px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid #333;
}

.category-rank {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 14px;
}

.category-info {
    flex: 1;
}

.category-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #ffffff;
}

.category-info p {
    font-size: 14px;
    opacity: 0.7;
}

.category-percentage {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
}

.category-details {
    background: #2d2d2d;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #333;
}

.category-details h2 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #ffffff;
}

.category-stats {
    space-y: 15px;
}

.category-stat-item {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #333;
}

.category-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.category-stat-header h3 {
    font-size: 16px;
    color: #ffffff;
    margin: 0;
}

.category-count {
    font-size: 14px;
    opacity: 0.7;
    background: #333;
    padding: 5px 10px;
    border-radius: 15px;
}

.category-stat-amounts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #2d2d2d;
    border-radius: 8px;
}

.stat-amount .label {
    font-size: 14px;
    opacity: 0.7;
}

.stat-amount .value {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}
