* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
}

.admin-body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.login-header {
    padding: 40px 30px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.login-header i {
    font-size: 3rem;
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.login-header p {
    opacity: 0.9;
}

.login-form {
    padding: 30px;
}

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

.login-form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
}

.login-form label i {
    margin-right: 6px;
    color: #667eea;
}

.login-form input {
    width: 100%;
    padding: 14px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.error-message {
    color: #ff6b6b;
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
}

.admin-panel {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.admin-sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

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

.admin-sidebar-header h2 {
    font-size: 1.1rem;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-sidebar-header h2 i {
    color: #667eea;
}

.admin-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.project-section h3 {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-project-list {
    list-style: none;
}

.sidebar-project-list li {
    padding: 10px 12px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.8);
}

.sidebar-project-list li:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.sidebar-project-list li.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.sidebar-project-list li.empty-message {
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    padding: 20px;
    background: transparent;
    cursor: default;
}

.sidebar-project-list li .project-icon {
    font-size: 0.9rem;
}

.sidebar-project-list li .project-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
}

.admin-main {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.admin-header {
    margin-bottom: 30px;
    color: white;
}

.admin-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-header h1 i {
    color: #667eea;
}

.admin-header p {
    font-size: 1rem;
    opacity: 0.7;
}

.admin-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.section-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: #667eea;
}

.project-count {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.projects-container {
    padding: 20px;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.4);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
    border-color: #667eea;
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.project-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-card-title i {
    font-size: 1.2rem;
    color: #667eea;
}

.project-card-title h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.project-card-actions {
    display: flex;
    gap: 8px;
}

.project-card-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.project-card-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.project-card-meta i {
    margin-right: 4px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(238, 90, 90, 0.4);
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    animation: fadeIn 0.2s ease;
}

.drawer-overlay.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.project-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: #1a1a2e;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
    transition: right 0.3s ease;
}

.project-drawer.active {
    right: 0;
}

.drawer-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.drawer-section {
    margin-bottom: 24px;
}

.drawer-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.info-row .label {
    width: 80px;
    color: rgba(255, 255, 255, 0.5);
}

.info-row span:last-child {
    flex: 1;
    color: rgba(255, 255, 255, 0.9);
}

#drawer-code,
#drawer-env {
    background: #0d0d1a;
    color: #00ff88;
    padding: 16px;
    border-radius: 8px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-actions {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.drawer-actions .btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1002;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #1a1a2e;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalIn 0.2s ease forwards;
}

@keyframes modalIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-body .form-group {
    margin-bottom: 16px;
}

.modal-body label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.modal-body input,
.modal-body textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transition: all 0.2s ease;
}

.modal-body input:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.modal-body textarea {
    min-height: 120px;
    resize: vertical;
    font-family: 'Fira Code', 'Consolas', monospace;
}

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

.form-row .form-group {
    flex: 1;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.toast.error {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        left: -100%;
        z-index: 900;
        transition: left 0.3s ease;
    }

    .admin-sidebar.active {
        left: 0;
    }

    .admin-main {
        padding: 20px;
    }

    .form-row {
        flex-direction: column;
    }

    .project-drawer {
        width: 100%;
    }
}