/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c5aa0;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --safe-top: env(safe-area-inset-top, 0);
    --safe-bottom: env(safe-area-inset-bottom, 0);
    --safe-left: env(safe-area-inset-left, 0);
    --safe-right: env(safe-area-inset-right, 0);
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-top: var(--safe-top);
}

.navbar .container.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 20px;
    flex-wrap: wrap;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: var(--transition);
}

.nav-toggle:hover,
.nav-toggle:focus {
    background: var(--light-color);
    border-color: var(--primary-color);
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--dark-color);
    border-radius: 1px;
    transition: var(--transition);
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-brand h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 0;
}

.nav-brand h1 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.nav-brand h1 a:hover {
    color: var(--secondary-color);
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Language switcher button — same look as nav links */
.nav-menu .lang-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--dark-color);
    font-weight: 500;
    font-size: inherit;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}
.nav-menu .lang-btn:hover {
    color: var(--primary-color);
}
/* Flag image — same look on all devices */
.nav-menu .lang-btn .lang-flag-img {
    vertical-align: middle;
    margin-right: 6px;
    display: inline-block;
    object-fit: contain;
}
.nav-menu .lang-btn .lang-label {
    vertical-align: middle;
}

.nav-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: var(--danger-color);
    border-radius: 10px;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: calc(56px + var(--safe-top));
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0;
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
        max-height: calc(100vh - 56px - var(--safe-top));
        overflow-y: auto;
        z-index: 999;
        -webkit-overflow-scrolling: touch;
    }

    .navbar.nav-open .nav-menu {
        display: flex;
    }

    .nav-menu a,
    .nav-menu .btn,
    .nav-menu .lang-btn {
        padding: 14px 20px;
        min-height: 48px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid var(--border-color);
        font-size: 1rem;
    }

    .nav-menu .btn {
        margin: 0.5rem 20px;
        justify-content: center;
        border-bottom: none;
    }
}

/* Buttons */
.btn {
    padding: 0.6rem 1.5rem;
    min-height: 44px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-secondary {
    background: var(--light-color);
    color: var(--dark-color);
}

/* Main Content */
main {
    margin-top: 2rem;
    min-height: calc(100vh - 200px);
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.card-meta {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Empty state / error state */
.empty-state {
    text-align: center;
    padding: 2rem 1.5rem;
    max-width: 560px;
    margin: 0 auto;
}

.empty-state h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.empty-state-description {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

.empty-state-description ul {
    padding-left: 1.25rem;
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Tabs */
.msg-tab {
    background: transparent;
    color: var(--dark-color);
    border: none;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 5px;
    transition: var(--transition);
}

.msg-tab:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.msg-tab.active {
    background: var(--primary-color);
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    min-height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    transition: var(--transition);
}

.form-group textarea {
    min-height: 120px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

.form-footer {
    margin-top: 1rem;
    text-align: center;
    color: #7f8c8d;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: var(--transition);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.close:hover {
    color: var(--dark-color);
}

/* Task Card */
.task-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.task-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.task-status {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-open {
    background: #e8f5e9;
    color: #27ae60;
}

.status-matched {
    background: #fff3e0;
    color: #f39c12;
}

.status-completed {
    background: #e3f2fd;
    color: #2196f3;
}

.status-cancelled {
    background: #ffebee;
    color: #e74c3c;
}

.task-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: var(--light-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--dark-color);
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Profile */
.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    font-weight: bold;
}

.profile-info h2 {
    margin-bottom: 0.5rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.star {
    color: #f39c12;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--light-color);
    border-radius: 5px;
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

.contact-link:hover {
    background: var(--primary-color);
    color: white;
}

/* Message author link (имя отправителя в списке сообщений) */
.message-author-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.message-author-link:hover {
    text-decoration: underline;
}

/* Toast Notifications */
#toastContainer {
    position: fixed;
    top: 80px;
    right: 20px;
    left: 20px;
    z-index: 3000;
    max-width: 400px;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

#toastContainer .toast {
    pointer-events: auto;
}

.toast {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-left: 4px solid var(--primary-color);
    animation: slideInRight 0.3s ease-out;
    opacity: 1;
    transition: opacity 0.3s ease;
    min-width: 280px;
}

.toast.error {
    border-left-color: var(--danger-color);
    background: #fee;
}

.toast.error strong {
    color: var(--danger-color);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.toast.success {
    border-left-color: var(--success-color);
    background: #efe;
}

.toast.success strong {
    color: var(--success-color);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.toast.info {
    border-left-color: var(--primary-color);
    background: #eff;
}

.toast.info strong {
    color: var(--primary-color);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.toast p {
    margin: 0;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.5;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Landing Page Styles */
.landing-page {
    width: 100%;
    min-height: 100vh;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: fadeInDown 0.8s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    animation: fadeInDown 0.8s ease 0.2s both;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInDown 0.8s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: #667eea;
}

/* Features Section */
.features-section {
    padding: 80px 20px;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* How It Works Section */
.how-it-works-section {
    padding: 80px 20px;
    background: var(--light-color);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.step p {
    color: #666;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
.landing-footer {
    background: var(--dark-color);
    color: white;
    padding: 60px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.footer-link {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.footer-link:hover {
    opacity: 1;
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.7;
}

.footer-bottom a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* User card — compact row: left (header), center (stats), right (actions) */
.user-card.card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    gap: 0.5rem 1rem;
}

.user-card .user-header {
    flex: 0 0 calc((100% - 2rem) / 3);
    min-width: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-card .user-header .user-header-rate {
    align-self: flex-end;
}

.user-card .user-header h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.user-card .user-header .badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 500;
}

.user-card .user-header .badge.freelancer {
    background: #e3f2fd;
    color: #1976d2;
}

.user-card .user-header .badge.client {
    background: #e8f5e9;
    color: #2e7d32;
}

.user-card .user-header .user-email {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: #7f8c8d;
}

.user-card .user-header p[style*="primary-color"],
.user-card .user-header p[style*="27ae60"] {
    margin-top: 0.25rem !important;
    margin-bottom: 0 !important;
}

.user-card .user-header div[style*="flex-wrap"] {
    margin-top: 0.35rem !important;
    margin-bottom: 0 !important;
}

.user-card .user-stats {
    flex: 0 0 calc((100% - 2rem) / 3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0 0.5rem;
}

.user-card .user-stats .user-stats-tags {
    width: 100%;
    justify-content: center;
}

.user-card .user-stats .user-stats-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.user-card .user-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.user-card .user-stats .stat-label {
    font-size: 0.75rem;
    color: #7f8c8d;
}

.user-card .user-stats .stat-val {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-card .user-card-actions {
    flex: 0 0 calc((100% - 2rem) / 3);
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
}

.user-card .user-card-actions .btn {
    margin: 0 !important;
}

.user-card .admin-controls,
.user-card [id^="user-review-form-"] {
    width: 100%;
    flex-basis: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    main {
        margin-top: 1rem;
        min-height: calc(100vh - 180px);
        padding-bottom: var(--safe-bottom);
    }

    .modal {
        align-items: flex-start;
        padding: 1rem;
        padding-top: max(1rem, var(--safe-top));
        overflow-y: auto;
    }

    .modal-content {
        width: 100%;
        max-width: none;
        margin: auto 0;
        padding: 1.5rem 1rem;
        padding-top: 2.5rem;
        border-radius: 12px;
    }

    .hero-section {
        padding: 60px 16px 80px;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-large {
        width: 100%;
        min-height: 48px;
    }

    .card,
    .task-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .profile-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    .profile-info h2 {
        font-size: 1.5rem;
    }

    .contact-links {
        justify-content: center;
    }

    .task-footer {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .task-tags {
        gap: 0.4rem;
    }

    .tag {
        font-size: 0.8rem;
        padding: 0.25rem 0.6rem;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px;
        padding: 0 12px;
    }

    .table-responsive table {
        min-width: 400px;
    }

    #toastContainer {
        left: 12px;
        right: 12px;
        top: 70px;
        max-width: none;
    }

    .toast {
        min-width: 0;
        width: 100%;
    }

    .user-card.card {
        flex-direction: column;
        align-items: stretch;
    }

    .user-card .user-header,
    .user-card .user-stats,
    .user-card .user-card-actions {
        flex: 1 1 auto;
    }

    .user-card .user-stats {
        margin: 0.5rem 0;
        justify-content: center;
    }

    .user-card .user-card-actions {
        justify-content: flex-start;
    }

    .how-it-works-section,
    .cta-section {
        padding: 48px 16px;
    }

    .cta-section h2 {
        font-size: 1.75rem;
    }

    .cta-section p {
        font-size: 1rem;
    }

    .landing-footer {
        padding: 40px 16px 20px;
        padding-bottom: calc(20px + var(--safe-bottom));
    }

    .footer-content {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.875rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .nav-brand h1 {
        font-size: 1.4rem;
    }

    .card-title {
        font-size: 1.15rem;
    }
}
