@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600&display=swap');

:root {
    --primary: #60a5fa;
    --primary-hover: #3b82f6;
    --bg-gradient: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(255, 255, 255, 0.8);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --success: #10b981;
    --error: #ef4444;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    margin: 0;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 1000px;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #60a5fa, #818cf8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 120px;
    box-shadow: var(--glass-shadow);
    position: relative;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
    border-color: var(--primary);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    color: var(--primary);
}

.card-title {
    font-weight: 500;
    font-size: 1.1rem;
}

.card-cta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover .card-cta {
    opacity: 1;
}

.project-card {
    border-left: 4px solid var(--primary);
}

.link-card {
    border-left: 4px solid #a78bfa;
}

.link-card .card-icon {
    color: #a78bfa;
}

/* Management Panel */
.admin-panel {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    margin-top: 2rem;
    box-shadow: var(--glass-shadow);
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

input[type="text"],
input[type="password"],
input[type="url"] {
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    width: 100%;
    font-family: 'Kanit', sans-serif;
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: var(--primary);
}

button {
    padding: 0 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    transition: background 0.2s;
}

button:hover {
    background: var(--primary-hover);
}

.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fee2e2;
    color: #ef4444;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    padding: 0;
    border: 1px solid #fecaca;
    opacity: 0;
    transition: all 0.2s;
}

.card:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: #ef4444;
    color: white;
}

.login-btn-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    color: var(--text-muted);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: var(--glass-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.login-btn-float:hover {
    transform: scale(1.1);
    color: var(--primary);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}