@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600&display=swap');

:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --secondary: #10B981;
    --dark: #1E293B;
    --light: #F8FAFC;
    --gray: #64748B;
    --border: #E2E8F0;
    --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    --card-bg: rgba(255, 255, 255, 0.9);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
}

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

body {
    font-family: 'Kanit', sans-serif;
    background: var(--bg-gradient);
    color: var(--dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
    flex: 1;
    width: 100%;
}

h1, h2, h3, h4 {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 3rem;
}

.app-header h1 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Glassmorphism Card */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: 'Kanit', sans-serif;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Kanit', sans-serif;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-danger {
    background-color: #EF4444;
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Search Box */
.search-box {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

/* Timeline/Status Styles */
.status-timeline {
    display: flex;
    justify-content: space-between;
    margin: 3rem 0;
    position: relative;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.status-timeline::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--border);
    z-index: 1;
}

.status-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.status-icon {
    width: 44px;
    height: 44px;
    background: white;
    border: 4px solid var(--border);
    border-radius: 50%;
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--gray);
    transition: all 0.3s ease;
}

.status-step.active .status-icon {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.4);
}

.status-step.completed .status-icon {
    border-color: var(--secondary);
    background: var(--secondary);
    color: white;
}

.status-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray);
}

.status-step.active .status-label {
    color: var(--primary);
    font-weight: 600;
}

/* Project Details */
.project-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

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

.info-item {
    margin-bottom: 1rem;
}

.info-label {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}

.info-value {
    font-weight: 500;
    font-size: 1.1rem;
}

/* Code Display */
.code-block {
    background: #1E1E1E;
    color: #D4D4D4;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 1rem;
    border: 1px solid #333;
}

/* Image Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-item {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.05);
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--light);
    font-weight: 600;
    color: var(--gray);
}

tr:hover {
    background: rgba(0,0,0,0.02);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-info { background: #DBEAFE; color: #1D4ED8; }
.badge-warning { background: #FEF3C7; color: #B45309; }
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-primary { background: #E0E7FF; color: #4338CA; }

/* Admin Nav */
.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.error-msg {
    background: #FEE2E2;
    color: #B91C1C;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #DC2626;
}

.success-msg {
    background: #D1FAE5;
    color: #065F46;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #10B981;
}

/* direct link input */
.direct-link-input {
    display: flex;
    gap: 0.5rem;
}
.direct-link-input input {
    flex: 1;
    background: #f1f5f9;
    color: #475569;
}
