/* assets/css/style.css */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #10b981;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    padding-top: var(--header-height); /* For sticky header */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 2rem;
    }
}

/* Sticky Nav */
nav {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0 1.5rem;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #6366f1, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

@media (min-width: 768px) {
    .nav-links a {
        margin-left: 1.5rem;
        font-size: 1rem;
    }
}

.nav-links a:hover, .nav-links a.active {
    color: white;
}

/* Auth Pages */
.auth-container {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1.25rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
    .auth-card {
        padding: 2.5rem;
    }
}

.auth-card h1 {
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.875rem;
    font-weight: 700;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    color: white;
    outline: none;
    transition: all 0.2s;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid #334155;
    color: var(--text-main);
}

.btn-outline:hover {
    background: #334155;
}

.error-msg {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1rem;
    align-items: start;
}
@media (min-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 280px 1fr;
    }
}

.sidebar {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10;
}

.sidebar-menu {
    list-style: none !important;
    margin-top: 2rem !important;
    padding: 0 !important;
}
.sidebar-menu li { 
    margin-bottom: 0.5rem !important;
    list-style: none !important;
}
.sidebar-menu a {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.75rem 1rem !important;
    border-radius: 0.75rem !important;
    color: var(--text-muted) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
}
.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(99, 102, 241, 0.1) !important;
    color: white !important;
}

.main-panel {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 0; /* Prevent overflow */
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: rgba(255, 255, 255, 0.02);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.table-container {
    overflow-x: auto;
}
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.quick-btn {
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    border: 1px solid #334155;
    background: transparent;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
}
.quick-btn:hover {
    border-color: var(--primary-color);
    color: white;
    background: rgba(99, 102, 241, 0.1);
}
/* Form Elements */
.form-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}
.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0.5rem;
}
.tab-btn.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}
.tab-content { display: none; transition: opacity 0.3s; }
.tab-content.active { display: block; }

.gallery-manager {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.gallery-card {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.gallery-card img { width: 100%; height: 100%; object-fit: cover; }
.gallery-card .delete-overlay {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.gallery-card:hover .delete-overlay { opacity: 1; }

.collab-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
}
@media (min-width: 768px) {
    .collab-row {
        grid-template-columns: 1fr 1fr 1fr auto;
        align-items: flex-end;
    }
}
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.status-released { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.status-upcoming { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.status-draft { background: rgba(148, 163, 184, 0.1); color: #94a3b8; }

.text-gradient {
    background: linear-gradient(to right, #6366f1, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Projects Showcase */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

.project-img-wrapper {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.1);
}

.project-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.project-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-meta {
    margin-top: auto;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Developer Profile */
.dev-hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.profile-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}
@media (min-width: 768px) {
    .profile-card { grid-template-columns: auto 1fr; }
}
.profile-img-large {
    width: 180px;
    height: 180px;
    background: var(--primary-color);
    border-radius: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    font-weight: 800;
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.4);
}
.stat-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
}

/* Custom Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.modal-content {
    background: #1e293b;
    padding: 2.5rem;
    border-radius: 1.5rem;
    max-width: 450px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.modal-text {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-danger {
    background: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
}
