/* --- RESET & VARIABLES --- */
:root {
    --purple-gradient: linear-gradient(135deg, #7b7bd4 0%, #5e4bb0 100%);
    --card-bg: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #636e72;
    --accent: #5e4bb0;
    --error-bg: #ffe5e5;
    --error-text: #d93025;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

body {
    background: var(--purple-gradient);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.container {
    width: 100%;
    max-width: 700px;
}

/* --- WHITE CARD (Used in Login, Register, & Index) --- */
.card, .white-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    text-align: center;
    width: 100%;
    max-width: 420px; /* Mas maliit nang konti para sa forms */
    animation: fadeIn 0.5s ease-out;
}

/* Overide para sa Index Page na mas malapad */
.container .white-card {
    max-width: 700px;
}

/* --- FORM STYLING (Login & Register) --- */
h2 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 25px;
    font-weight: 700;
}

.input-group {
    position: relative; /* Mahalaga para sa Show/Hide Icon */
    margin-bottom: 15px;
    width: 100%;
}

input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid #e1e1e1;
    font-size: 15px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    outline: none;
}

input:focus {
    border-color: var(--accent);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(94, 75, 176, 0.1);
}

/* Icon Toggle Position */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

button {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    background: var(--purple-gradient);
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(94, 75, 176, 0.3);
}

.login-text {
    margin-top: 25px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.login-text a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.error-msg {
    background-color: var(--error-bg);
    color: var(--error-text);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #ffcccc;
}

/* --- INDEX/HOME SPECIFIC STYLES --- */
.main-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-text {
    font-size: 3rem;
    color: white;
    letter-spacing: -1px;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tab-btn {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.tab-btn.active, .tab-btn:hover {
    background: var(--accent);
}

.logout-link {
    display: block;
    text-align: center;
    color: #ffcccc;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 10px;
}

.profile-img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f0f0f0;
    margin-top: 20px;
}

.skills-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    border-top: 1px solid #f0f0f0;
    padding-top: 30px;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 480px) {
    .white-card, .card { padding: 40px 20px; }
    .hero-title { font-size: 2rem; }
    .skills-section { grid-template-columns: 1fr; }
}