:root {
    --primary-color: #4a148c; /* Darker Purple */
    --secondary-color: #880e4f; /* Darker Pink */
    --accent-color: #00bcd4; /* Cyan Blue */
    --text-color: #333;
    --background-light: #fdfdfe; /* Almost white */
    --background-dark: #2c3e50;
    --card-background: #ffffff;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-light);
    color: var(--text-color);
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
    opacity: 0.15; /* Slightly less opaque */
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Header */
.main-header {
    text-align: center;
    padding: 80px 20px 60px; /* More padding top */
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px var(--shadow-medium); /* Stronger shadow */
}

.main-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shine 8s infinite linear;
}

@keyframes shine {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.main-header h1 {
    font-size: 3.8em; /* Larger heading */
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 8px var(--shadow-medium);
    animation: fadeInDown 1s ease-out;
}

.main-header p {
    font-size: 1.4em;
    opacity: 0.95;
    animation: fadeIn 1.5s ease-out;
}

/* Link Grid (Replaces Page Grid) */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Slightly smaller min-width */
    gap: 30px; /* Reduced gap */
    padding: 50px;
    max-width: 1000px; /* Reduced max-width for tighter layout */
    margin: 0 auto;
    perspective: 1000px;
}

/* Link Card (Replaces Page Card - now button-like) */
.link-card {
    background-color: var(--card-background);
    border-radius: 12px; /* Slightly less rounded */
    overflow: hidden;
    box-shadow: 0 8px 25px var(--shadow-medium); /* Stronger initial shadow */
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, background-color 0.3s ease;
    position: relative;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column; /* Keep flex for content alignment */
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center content horizontally */
    min-height: 150px; /* Minimum height for the button */
    padding: 25px;
    text-align: center;
    cursor: pointer;
    will-change: transform, box-shadow;
}

.link-card:hover {
    transform: translateY(-10px) scale(1.02); /* More subtle lift and scale */
    box-shadow: 0 15px 35px var(--shadow-medium), 0 0 20px var(--accent-color);
    background-color: var(--background-light); /* Slight background change on hover */
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(var(--accent-color), 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 12px;
    z-index: 1; /* Ensure it's above content but below title */
}

.link-card:hover::before {
    opacity: 1;
}

/* Link Title (Replaces Page Title) */
.link-title {
    font-size: 1.8em;
    margin: 0; /* Remove default margins */
    color: var(--primary-color);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
    z-index: 2; /* Ensure title is above pseudo-element */
}

.link-card:hover .link-title {
    color: var(--secondary-color);
    transform: translateY(-3px); /* Slight lift on title */
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--background-dark);
    color: #ccc;
    font-size: 0.9em;
    margin-top: 50px;
    box-shadow: 0 -4px 15px var(--shadow-medium);
}

/* Animations (from Animate.css inspiration) - no changes to keyframes */
@keyframes fadeInDown {
    from { opacity: 0; transform: translate3d(0, -20px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

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

@keyframes fadeInUp {
    from { opacity: 0; transform: translate3d(0, 20px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-header h1 { font-size: 2.8em; }
    .main-header p { font-size: 1.2em; }
    .link-grid { padding: 30px; gap: 20px; }
    .link-card { min-height: 120px; padding: 20px; }
    .link-title { font-size: 1.6em; }
}

@media (max-width: 480px) {
    .main-header { padding: 40px 15px; }
    .main-header h1 { font-size: 2.2em; }
    .main-header p { font-size: 1.1em; }
    .link-grid { padding: 20px; grid-template-columns: 1fr; }
    .link-card { min-height: 100px; padding: 15px; }
    .link-title { font-size: 1.4em; }
}
