/*
Theme Name: Antigravity Eco Theme
Description: A premium Neumorphic backend for the Project Manager Ecosystem.
Author: Giuseppe Lobbene
Version: 1.3.0
*/

:root {
    --bg-color: #E0E5EC;
    --text-color: #4A5568;
    --accent-color: #6B4CFF;
    --shadow-light: #ffffff;
    --shadow-dark: #A3B1C6;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --danger-color: #F44336;
    --info-color: #2196F3;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 10px 0;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-color);
    letter-spacing: -1px;
}

/* Neumorphic Core */
.neumorphic {
    background: var(--bg-color);
    border-radius: 20px;
    box-shadow: 12px 12px 24px rgba(163, 177, 198, 0.7),
        -12px -12px 24px rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.neumorphic.active {
    box-shadow: inset 6px 6px 12px rgba(163, 177, 198, 0.8),
        inset -6px -6px 12px rgba(255, 255, 255, 0.9);
    color: var(--accent-color);
}

.neumorphic:hover:not(.active) {
    box-shadow: 15px 15px 30px rgba(163, 177, 198, 0.9),
        -15px -15px 30px rgba(255, 255, 255, 0.9);
}

/* Components */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.project-card {
    padding: 25px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 15px 0;
    line-height: 1.2;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.progress-container {
    height: 8px;
    background: rgba(163, 177, 198, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin: 15px 0;
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.05);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #8B74FF);
    border-radius: 4px;
    transition: width 0.8s ease-in-out;
}

.progress-bar.completed {
    background: var(--success-color);
}

.tech-badge {
    background: var(--bg-color);
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #718096;
    margin-right: 8px;
    box-shadow: 4px 4px 8px rgba(163, 177, 198, 0.4),
        -4px -4px 8px rgba(255, 255, 255, 0.6);
}

.links-row {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.link-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--accent-color);
    background: var(--bg-color);
    box-shadow: 6px 6px 12px #bebebe, -6px -6px 12px #ffffff;
    transition: 0.2s;
}

.link-btn:hover {
    color: white;
    background: var(--accent-color);
    transform: translateY(-2px);
}

.link-btn:active {
    box-shadow: inset 4px 4px 8px #5a3edb, inset -4px -4px 8px #7c5aff;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    50% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

.deadline-active {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    margin-bottom: 10px;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #F44336;
    border-radius: 50%;
    animation: pulse 1s infinite;
    box-shadow: 0 0 8px rgba(244, 67, 54, 0.8);
}

.project-card-header {
    border-radius: 20px 20px 0 0;
    padding: 15px 25px;
    margin: -25px -25px 15px -25px;
}

.project-card-body {
    padding-top: 10px;
}

/* Mobile Fixes */
@media (max-width: 600px) {
    .header h1 {
        font-size: 1.8rem;
    }

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

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 1000;
    border: none;
    cursor: pointer;
}

.fab i {
    font-size: 30px;
    color: var(--accent-color);
}

.fab:active {
    box-shadow: inset 6px 6px 12px rgba(163, 177, 198, 0.8),
        inset -6px -6px 12px rgba(255, 255, 255, 0.9);
}

/* Modal Overlay & Transitions */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(224, 229, 236, 0.9);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    padding: 40px;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (min-width: 900px) {
    .modal-content {
        width: 90%;
        max-width: 850px;
        height: 95vh;
        border-radius: 30px;
        box-shadow: 20px 20px 60px rgba(163, 177, 198, 0.5),
            -20px -20px 60px rgba(255, 255, 255, 0.8);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(163, 177, 198, 0.3);
}

.modal-header h2 {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-color);
    margin: 0;
    letter-spacing: -1px;
}

/* Form Sections */
.form-section {
    background: rgba(255, 255, 255, 0.2);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.section-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

.form-checklist-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-radius: 12px;
    transition: 0.2s;
}

.form-checklist-row:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Sticky Footer */
.modal-footer {
    margin-top: auto;
}

/* Responsive Grid Adjustments */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

@media (max-width: 480px) {
    .project-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 20px;
    }

}

/* Filter Bar - Floating Chips */
.filter-bar {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 15px 5px;
    margin-bottom: 25px;
    scrollbar-width: none;
    background: transparent;
    align-items: center;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.chip {
    white-space: nowrap;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    color: var(--text-color);
}

.chip.active {
    background: var(--accent-color);
    color: white;
    box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.1),
        inset -2px -2px 4px rgba(255, 255, 255, 0.1);
}

#focus-toggle {
    margin-left: auto;
}

@media (max-width: 600px) {
    #focus-toggle {
        margin-left: initial;
    }
}