/* Modal Styles for Project Selection */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'PragmataPro Liga', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-image: linear-gradient(to right top, #1f0537, #380c60, #55108c, #7413bb, #9612eb);
    height: 100%;
    margin: 0;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

form {
  background: rgba(255, 255, 255, 0.3);
  padding: 3em;
  height: 320px;
  border-radius: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  box-shadow: 20px 20px 40px -6px rgba(0, 0, 0, 0.2);
  text-align: center;
  position: relative;
  transition: all 0.2s ease-in-out;
}

/* Modal Content */
.modal-content {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 20px 20px 40px -6px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    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 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
    color: #ebeff3;
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    font-family: 'derdicke';

}

.modal-header h3 {
    color: #ebeff3;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    font-family: 'derdicke';

}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #7f8c8d;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background-color: #ecf0f1;
    color: #2c3e50;
}

/* Modal Body */
.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

/* User Info */
.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.user-info span {
    color: #2c3e50;
    font-size: 14px;
}

.user-info strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    min-height: 200px;
}

/* Loading State */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-style: italic;
}

/* No Projects State */
.no-projects {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #e74c3c;
    background-color: #fdf2f2;
    border-radius: 8px;
    border: 2px solid #f5c6cb;
}

/* Project Cards */
.project-card {
    /* background: white; */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #ffffff;

}

.project-card.owned {
    border-left: 4px solid #e8e8e8;
}

.project-card.shared {
    border-left: 4px solid #3498db;
}

/* Project Header */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.project-title {
    font-size: 16px;
    font-weight: 600;
    color: #ced2d6;
    margin: 0;
    line-height: 1.3;
    flex: 1;
    margin-right: 8px;
}

.project-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.access-type {
    font-size: 16px;
}

/* Project Details */
.project-details {
    margin-bottom: 12px;
}

.project-details p {
    font-size: 13px;
    color: #ced2d6;
    margin-bottom: 4px;
    line-height: 1.4;
}

.project-owner {
    font-weight: 500;
    color: #34495e;
}

.project-last-edit {
    font-size: 12px;
}

.project-url {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background-color: #f8f9fa;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 11px;
    word-break: break-all;
    max-height: 32px;
    overflow: hidden;
}

/* Project Footer */
.project-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.access-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.access-badge.owned {
    background-color: #fdf2f2;
    color: #e74c3c;
    border: 1px solid #f5c6cb;
}

.access-badge.shared {
    background-color: #e8f4fd;
    color: #3498db;
    border: 1px solid #bee5eb;
}

/* Lock Icon */
.project-card.locked::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 20px 20px 0;
    border-color: transparent #f39c12 transparent transparent;
}

.project-card.locked .project-title::after {
    content: ' 🔒';
    font-size: 14px;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 16px 24px 24px;
    border-top: 1px solid #e0e0e0;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: 1px solid #eeeeee;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    /* background-color: #3498db; */
    /* color: white; */
    background-color: transparent;
    color:#ffffff;
    font-weight: 700;
}

.btn-primary:hover {
    /* background-color: #b4c5cf; */
    transform: translateY(-1px);
    border: 1px solid #726275;
}

.btn-secondary {
    /* background-color: #ecf0f1;
    color: #2c3e50; */
    /* background-color: cornsilk; */
    background-color: transparent;
    color:#ffffff;
    font-weight: 700;
}

.btn-secondary:hover {
    border: 1px solid #726275;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 20px 20px 12px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 12px 20px 20px;
        flex-direction: column-reverse;
        gap: 8px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .project-card {
        padding: 12px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .project-title {
        font-size: 14px;
    }
}

/* Animation for project cards appearing */
.project-card {
    animation: cardSlideIn 0.4s ease-out;
    animation-fill-mode: both;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for cards */
.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(n+6) { animation-delay: 0.6s; }