/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

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

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 15px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.modal-header h2 {
    margin: 0;
    color: #00d4ff;
    font-size: 1.5rem;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #00d4ff;
    background: rgba(0, 0, 0, 0.3);
}

.modal-body {
    padding: 20px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #00d4ff rgba(255, 255, 255, 0.1);
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #00d4ff;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #0099cc;
}

/* Project Modal Content */
.project-modal-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .project-modal-content {
        grid-template-columns: 1fr 1fr;
    }
}

.modal-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-about {
    grid-column: 1 / -1;
}

.modal-section h3 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid #00d4ff;
    padding-bottom: 5px;
}

.modal-section p {
    color: #e0e0e0;
    line-height: 1.6;
    margin-bottom: 10px;
}

.modal-section ul {
    list-style: none;
    padding: 0;
}

.modal-section ul li {
    color: #e0e0e0;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.modal-section ul li::before {
    content: "▶";
    color: #00d4ff;
    position: absolute;
    left: 0;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-item i {
    color: #00d4ff;
    font-size: 1.2rem;
    width: 20px;
}

.feature-item p {
    margin: 0;
    color: #e0e0e0;
    font-size: 0.9rem;
}

/* Tech Stack */
.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.tech-item {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tech-item i {
    font-size: 2rem;
    color: #00d4ff;
    margin-bottom: 10px;
}

.tech-item h4 {
    margin: 5px 0;
    color: #fff;
    font-size: 1rem;
}

.tech-item p {
    margin: 0;
    color: #ccc;
    font-size: 0.8rem;
}

/* Screenshots */
.screenshots-section {
    grid-column: 1 / -1;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.screenshot-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

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

.screenshot-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s;
}

.screenshot-card:hover img {
    transform: scale(1.05);
}

.screenshot-card h4 {
    padding: 10px;
    margin: 0;
    color: #00d4ff;
    font-size: 1rem;
}

.screenshot-card p {
    padding: 0 10px 10px;
    margin: 0;
    color: #ccc;
    font-size: 0.8rem;
}

/* Image Modal for Screenshots */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

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

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.image-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Zoom Controls */
.zoom-controls {
    display: flex;
    gap: 10px;
}

.zoom-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.zoom-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #00d4ff;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-body {
        padding: 15px;
        max-height: calc(95vh - 120px);
    }

    .project-modal-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

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

    .tech-stack {
        grid-template-columns: repeat(2, 1fr);
    }
}
