.my-projects-hero {
    margin: 1rem 0 1.5rem;
    padding: 1.35rem 2rem;
    border-radius: 20px;
    border: 1px solid #d9e8ff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background:
        radial-gradient(circle at 7% 5%, rgba(14, 165, 183, 0.18), transparent 40%),
        radial-gradient(circle at 92% 12%, rgba(47, 108, 255, 0.16), transparent 42%),
        linear-gradient(135deg, #f6fbff 0%, #eef5ff 100%);
    box-shadow: 0 12px 30px rgba(23, 64, 112, 0.11);
    position: relative;
    overflow: hidden;
}

.my-projects-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(92deg, rgba(46, 137, 205, 0.06), transparent 40%, rgba(14, 165, 183, 0.08));
}

.my-projects-hero-main {
    min-width: 0;
}

.my-projects-title {
    margin: 0;
    font-size: clamp(1.7rem, 3.2vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f355b;
    display: inline-flex;
    align-items: center;
    gap: 0.52rem;
    text-align: left;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.62),
        0 0 18px rgba(15, 53, 91, 0.35),
        0 0 40px rgba(24, 74, 136, 0.18);
    animation: title-glow 2.8s ease-in-out infinite alternate;
}

@keyframes title-glow {
    from {
        text-shadow:
            0 1px 0 rgba(255, 255, 255, 0.62),
            0 0 12px rgba(15, 53, 91, 0.28),
            0 0 28px rgba(24, 74, 136, 0.12);
    }
    to {
        text-shadow:
            0 1px 0 rgba(255, 255, 255, 0.62),
            0 0 22px rgba(15, 53, 91, 0.5),
            0 0 50px rgba(24, 74, 136, 0.28);
    }
}

.my-projects-title-icon {
    width: clamp(26px, 3vw, 34px);
    height: clamp(26px, 3vw, 34px);
    object-fit: contain;
    filter: drop-shadow(0 3px 7px rgba(24, 74, 136, 0.22));
}

.my-projects-subtitle {
    margin: 0.5rem 0 0;
    color: #446a8d;
    max-width: 760px;
}

.my-projects-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 0.7rem;
    min-width: min(52vw, 340px);
}

.my-projects-stat-card {
    border: 1px solid #a8c7e8;
    border-radius: 14px;
    padding: 0.72rem 0.85rem;
    background: linear-gradient(168deg, #ffffff 0%, #f4f9ff 100%);
    backdrop-filter: blur(2px);
    box-shadow:
        0 10px 20px rgba(24, 66, 114, 0.14),
        0 1px 0 rgba(255, 255, 255, 0.85) inset;
    transform: translateY(0);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.my-projects-stat-card:nth-child(1) {
    border-color: #9fc6ec;
    background: linear-gradient(162deg, #fafdff 0%, #e8f4ff 100%);
}

.my-projects-stat-card:nth-child(2) {
    border-color: #9fd5dd;
    background: linear-gradient(162deg, #f8ffff 0%, #e5f7f9 100%);
}

.my-projects-stat-card:hover,
.my-projects-stat-card:focus-within {
    transform: translateY(-3px);
    box-shadow:
        0 16px 28px rgba(24, 66, 114, 0.2),
        0 0 0 1px rgba(123, 170, 224, 0.22),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.my-projects-stat-card:nth-child(2):hover,
.my-projects-stat-card:nth-child(2):focus-within {
    box-shadow:
        0 16px 28px rgba(21, 98, 98, 0.2),
        0 0 0 1px rgba(110, 188, 183, 0.26),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.my-projects-stat-label {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-weight: 700;
    color: #516d89;
    margin-bottom: 0.28rem;
}

.my-projects-stat-value {
    display: inline-flex;
    align-items: baseline;
    gap: 0.12rem;
    font-size: 1.4rem;
    line-height: 1;
    color: #18446e;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.my-projects-stat-card:nth-child(2) .my-projects-stat-value {
    color: #0f6362;
}

.my-projects-stat-value small {
    font-size: 0.74rem;
    color: #5c7694;
    font-weight: 700;
}

.my-projects-controls {
    margin: 1.25rem 0 1.6rem;
}

.my-projects-controls .search-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.my-projects-controls .search-input-wrap {
    flex: 1;
    position: relative;
}

.my-projects-controls .search-input-icon {
    position: absolute;
    left: 1.6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.58;
    pointer-events: none;
}

.my-projects-controls .search-input {
    width: 100%;
    padding: 0.92rem 3.2rem;
    min-height: 52px;
    border: 1.5px solid #cfe0f7;
    border-radius: 12px;
    font-size: 0.95rem;
    background: #fff;
    color: #1f2f46;
    box-shadow: 0 6px 16px rgba(25, 55, 97, 0.08);
    outline: none;
}

.my-projects-controls .search-input:focus {
    border-color: #58a9d7;
    box-shadow: 0 0 0 3px rgba(14, 165, 183, 0.16), 0 8px 18px rgba(24, 68, 120, 0.12);
}

.my-projects-controls .filters-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem;
    min-height: 52px;
    min-width: 52px;
    background: #fff;
    color: #2468a0;
    box-shadow: 0 4px 12px rgba(25, 65, 116, 0.13);
    border: 1.5px solid #cfe0f7;
    border-radius: 12px;
}

.my-projects-controls .filters-toggle.is-active {
    background: linear-gradient(135deg, #e9f8fc 0%, #e5efff 100%);
    color: #1f507f;
    box-shadow: 0 5px 14px rgba(31, 80, 127, 0.18);
    border: 1.5px solid #b7d4f3;
}

.my-projects-controls .filters-toggle-icon {
    width: 22px;
    height: 22px;
}

.my-projects-controls .filters-panel {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    margin-top: 0;
    padding: 0 1rem;
    border: 1px solid #d3e2f7;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
    pointer-events: none;
    transition:
        max-height 0.3s ease,
        opacity 0.24s ease,
        transform 0.24s ease,
        margin-top 0.24s ease,
        padding 0.24s ease,
        visibility 0s linear 0.3s;
    transform: translateY(-6px);
}

.my-projects-controls .filters-panel.is-open {
    max-height: 260px;
    opacity: 1;
    visibility: visible;
    margin-top: 1rem;
    padding: 1rem;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
}

.my-projects-controls .filters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.my-projects-controls .filter-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4e607b;
}

.my-projects-controls .filter-label-icon {
    width: 18px;
    height: 16px;
}

.my-projects-controls .filter-select {
    width: 100%;
    padding: 0.72rem 2.5rem 0.72rem 0.9rem;
    border: 1.5px solid #c9dbf3;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #30435f;
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, transparent 50%, #2f6cff 50%),
        linear-gradient(135deg, #2f6cff 50%, transparent 50%),
        linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
    background-position:
        calc(100% - 16px) calc(50% - 3px),
        calc(100% - 11px) calc(50% - 3px),
        0 0;
    background-size: 6px 6px, 6px 6px, 100% 100%;
    background-repeat: no-repeat;
    box-shadow: 0 3px 10px rgba(28, 63, 111, 0.08);
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
}

.my-projects-controls .filter-select:focus {
    border-color: #6c9de0;
    box-shadow: 0 0 0 3px rgba(47, 108, 255, 0.16), 0 5px 14px rgba(38, 82, 142, 0.14);
}

#my-projects-results .idea-primary-action:not(.is-open):not(.is-edit) {
    background: linear-gradient(135deg, #667eea 0%, #7a57d1 52%, #5e8cff 100%);
    border-color: #6f7bec;
    color: #ffffff;
    box-shadow:
        0 10px 24px rgba(102, 126, 234, 0.36),
        0 0 0 1px rgba(122, 87, 209, 0.28),
        0 0 22px rgba(111, 123, 236, 0.45);
}

#my-projects-results .idea-primary-action:not(.is-open):not(.is-edit):hover {
    transform: translateY(-3px);
    border-color: #6f7bec;
    box-shadow:
        0 18px 36px rgba(111, 123, 236, 0.56),
    0 0 36px rgba(122, 87, 209, 0.64);
}

#my-projects-results .idea-primary-action.is-open {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-color: #4facfe;
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 165, 210, 0.28);
}

#my-projects-results .idea-primary-action.is-open:hover {
    transform: translateY(-3px);
    border-color: #00c8e0;
    box-shadow: 0 14px 28px rgba(0, 165, 210, 0.42);
}

#my-projects-results .idea-primary-action.is-edit {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-color: #f093fb;
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(240, 87, 108, 0.28);
}

#my-projects-results .idea-primary-action.is-edit:hover {
    transform: translateY(-3px);
    border-color: #e04070;
    box-shadow: 0 14px 28px rgba(240, 87, 108, 0.42);
}

/* Modal Styles (matched with admin dashboard confirmation modal) */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

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

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

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-50px);
    }
}

/* Confirmation Modal Styles */
.confirmation-modal .modal-content {
    max-width: 450px;
    max-height: none;
    border-radius: 20px;
}

.confirmation-modal-content {
    padding: 2.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.confirmation-icon {
    animation: iconPulse 0.6s ease-out;
}

@keyframes iconPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

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

.confirmation-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2f2f2f;
}

.confirmation-message {
    margin: 0;
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
}

.confirmation-buttons {
    display: flex;
    gap: 1rem;
    width: 100%;
    margin-top: 0.5rem;
}

.confirmation-buttons .btn-cancel,
.confirmation-buttons .btn-confirm {
    flex: 1;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirmation-buttons .btn-cancel {
    background: #f0f0f0;
    color: #666;
}

.confirmation-buttons .btn-cancel:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.confirmation-buttons .btn-confirm {
    background: linear-gradient(135deg, #f15f79 0%, #b24592 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(177, 54, 118, 0.3);
}

.confirmation-buttons .btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(177, 54, 118, 0.4);
}

.confirmation-buttons .btn-confirm:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .my-projects-hero {
        padding: 1.1rem;
        flex-direction: column;
        align-items: stretch;
    }

    .my-projects-stats {
        grid-template-columns: 1fr 1fr;
        min-width: 0;
    }

    .my-projects-controls .search-row {
        align-items: stretch;
    }

    .my-projects-controls .filters-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .my-projects-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
}
