/* Base Styles */
:root {
    --primary-color: #e41e26;
    --primary-light: #ff6b56;
    --primary-dark: #a90000;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --text-light: #6c757d;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    --gradient-secondary: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

@keyframes expandWidth {
    from { width: 0; }
    to { width: 100%; }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: #f5f5f5;
    line-height: 1.6;
}

/* Common Layout */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    background-color: var(--white);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-out;
}

/* Header Styles */
.app-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 16px;
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: 0 2px 10px rgba(228, 30, 38, 0.3);
}

.app-header h1 {
    font-size: 1.5rem;
    margin: 0;
    flex-grow: 1;
    text-align: center;
    animation: slideIn 0.4s ease-out;
}

.app-header h1 i {
    margin-right: 8px;
    animation: bounce 2s infinite;
}

.back-button {
    color: var(--white);
    text-decoration: none;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.back-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateX(-3px);
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.tab-navigation a {
    flex: 1;
    text-align: center;
    padding: 14px 8px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.tab-navigation a i {
    font-size: 1.1rem;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.tab-navigation a:hover i {
    transform: translateY(-2px);
}

.tab-navigation a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.tab-navigation a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    animation: expandWidth 0.3s ease-out;
}

.content-area {
    padding: 16px;
    animation: fadeIn 0.5s ease-out;
}

/* Common Section Styles */
.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    padding-left: 15px;
}

.section-title:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 70%;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.section-title i {
    animation: pulse 2s infinite;
}

/* Button Styles */
.action-button {
    padding: 14px;
    border-radius: var(--border-radius);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow);
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.action-button:active {
    transform: translateY(0);
}

.action-button i {
    transition: transform 0.3s ease;
}

.action-button:hover i {
    transform: rotate(10deg);
}

.primary-button {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
}

.secondary-button {
    background: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

/* Footer */
.app-footer {
    display: flex;
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.footer-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-light);
    padding: 8px 0;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.footer-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.footer-item:hover:before, .footer-item.active:before {
    width: 40%;
}

.footer-item i {
    font-size: 1.25rem;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.footer-item:hover i {
    transform: translateY(-3px);
}

.footer-item.active {
    color: var(--primary-color);
}

.footer-item.active i {
    animation: pulse 1.5s infinite;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .app-container {
        width: 100%;
        max-width: none;
    }
}
