/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

:root {
    /* Color Variables */
    --primary-heart: #8a2be2;
    /* Deep purple */
    --light-heart: #b19cd9;
    /* Light lavender */
    --accent-heart: #20b2aa;
    /* Teal */
    --dark-heart: #483d8b;
    /* Dark slate blue */
    --primary-cloud: #e0f7fa;
    /* Very light cyan */
    --accent-cloud: #4fc3f7;
    /* Light blue */
    --accent-yellow: #fff9c4;
    /* Light yellow */
    --accent-warm: #ffe0b2;
    /* Light orange */
    --text-dark: #333;
    --text-light: #fff;
    --background: #f8f9fa;
}

/* Base Layout */
html,
body {
    height: 100%;
    width: 100%;
    background-color: var(--background);
}

body {
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    flex-grow: 1;
}

/* Typography */
h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    color: var(--text-light);
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

h2 {
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: clamp(1.2rem, 4vw, 1.8rem);
}

h3 {
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: clamp(1rem, 3vw, 1.4rem);
}

h4 {
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
}

p {
    line-height: 1.6;
    color: var(--text-dark);
    font-size: clamp(0.9rem, 2vw, 1rem);
}

/* Header Styles */
header {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-heart) 0%, var(--accent-heart) 100%);
    border-radius: 15px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.logo-container {
    background-color: var(--primary-cloud);
    padding: 15px;
    border-radius: 10px;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 100px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.logo-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 120'%3E%3Cdefs%3E%3ClinearGradient id='background-gradient' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23e0f7fa' /%3E%3Cstop offset='100%25' stop-color='%234fc3f7' /%3E%3C/linearGradient%3E%3ClinearGradient id='heart-gradient' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%238a2be2' /%3E%3Cstop offset='100%25' stop-color='%2320b2aa' /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='300' height='120' rx='10' ry='10' fill='url(%23background-gradient)' /%3E%3Cpath d='M45,30 Q45,20 55,20 Q65,20 65,30 Q75,20 85,30 Q95,20 95,30 Q95,40 85,40 Q75,50 65,40 Q55,50 45,40 Q35,40 45,30' fill='%23e0f7fa' stroke='%234fc3f7' stroke-width='1.5' /%3E%3Cpath d='M225,70 Q225,60 235,60 Q245,60 245,70 Q245,80 225,95 Q205,80 205,70 Q205,60 215,60 Q225,60 225,70' fill='url(%23heart-gradient)' stroke='%23483d8b' stroke-width='1.5' /%3E%3Ctext x='150' y='70' font-family='Arial, sans-serif' font-size='15' font-weight='bold' text-anchor='middle' fill='%23333'%3EOpen Air/Open Heart Project%3C/text%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Navigation Styles */
nav {
    background: linear-gradient(to right, var(--accent-heart), var(--light-heart));
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

nav ul {
    display: flex;
    list-style: none;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
}

nav ul li {
    flex: 1 1 150px;
    max-width: 200px;
    text-align: center;
}

nav ul li a {
    display: block;
    text-decoration: none;
    color: var(--text-dark);
    background-color: var(--primary-cloud);
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav ul li a:hover {
    background-color: var(--accent-cloud);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: var(--text-light);
}

/* Main Content Styles */
main {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.content-box {
    flex: 1 1 300px;
    background: linear-gradient(135deg, var(--light-heart) 0%, var(--accent-heart) 100%);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.6s ease-out;
}

.full-width {
    flex: 1 1 100%;
}

/* Section Styles */
.pink-section {
    background-color: var(--light-heart);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 10px;
    flex-grow: 1;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.green-section {
    background-color: var(--accent-heart);
    border-radius: 10px;
    padding: 15px;
    color: var(--text-light);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.yellow-section {
    background-color: var(--accent-yellow);
    border-radius: 10px;
    padding: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Footer Styles */
footer {
    background: linear-gradient(to right, var(--dark-heart), var(--primary-heart));
    padding: 15px;
    text-align: center;
    border-radius: 10px;
    margin-top: auto;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    color: var(--text-light);
}

/* Form Styles */
.form-container {
    background-color: var(--primary-cloud);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-dark);
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-heart);
    outline: none;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.1);
}

button {
    background: linear-gradient(to right, var(--primary-heart), var(--accent-heart));
    border: none;
    padding: 14px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    color: var(--text-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Tab Container Styles */
.tab-container {
    display: flex;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 12px 10px;
    background-color: var(--primary-cloud);
    cursor: pointer;
    border-radius: 5px 5px 0 0;
    font-weight: bold;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.tab:hover {
    background-color: var(--accent-cloud);
}

.tab.active {
    background: linear-gradient(to bottom, var(--accent-cloud), var(--primary-cloud));
    border-bottom: 3px solid var(--accent-heart);
}

.form-content,
.data-content {
    display: none;
}

.form-content.active,
.data-content.active {
    display: block;
}

/* Contact Page Styles */
.contact-container {
    background-color: var(--primary-cloud);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
    gap: 20px;
}

.contact-card {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    border-radius: 10px;
    background: linear-gradient(to bottom right, #fff, #f5f5f5);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.contact-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    background-color: var(--primary-cloud);
    border: 3px solid var(--accent-cloud);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.contact-photo img {
    width: 100%;
    height: auto;
}

.contact-name {
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 5px;
    color: var(--primary-heart);
}

.contact-title {
    font-size: 1em;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 20px;
    font-style: italic;
}

.contact-details {
    font-size: 1em;
    line-height: 1.8;
}

.contact-detail {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.icon {
    width: 28px;
    height: 28px;
    margin-right: 12px;
    background: linear-gradient(to bottom right, var(--primary-heart), var(--accent-heart));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-light);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.contact-detail a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-detail a:hover {
    color: var(--primary-heart);
}

/* Map Container */
.map-container {
    height: 300px;
    width: 100%;
    background-color: #f0f0f0;
    margin-top: 30px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.map-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    text-align: center;
    flex-direction: column;
}

.map-marker {
    width: 30px;
    height: 30px;
    background-color: #ffd6e0;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    position: relative;
    animation: bounce 1s infinite alternate;
    margin-bottom: 15px;
}

/* About Us Page Styles */
.team-member {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.member-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--primary-cloud);
    border: 3px solid var(--accent-cloud);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.member-photo img {
    width: 100%;
    height: auto;
}

.mission-box {
    background-color: var(--primary-cloud);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--accent-cloud);
}

.vision-box {
    background-color: var(--accent-yellow);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--accent-warm);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 40px auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--accent-cloud);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    opacity: 0;
}

.timeline-item.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: white;
    border: 4px solid var(--primary-heart);
    border-radius: 50%;
    top: 15px;
    z-index: 1;
}

.left::after {
    right: -10px;
}

.right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Data Display Page */
.data-container {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.vital-stats {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.stat-box {
    flex: 1 1 45%;
    min-width: 200px;
    padding: 20px;
    border-radius: 10px;
    background: linear-gradient(to bottom right, #fff, #f5f5f5);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.stat-label {
    font-size: 0.9em;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: bold;
}

.stat-value {
    font-size: 2.2em;
    font-weight: bold;
    color: var(--primary-heart);
}

.stat-unit {
    font-size: 0.8em;
    color: var(--text-dark);
    margin-left: 3px;
}

/* Chart Container */
.chart-container {
    width: 100%;
    height: 350px;
    background: linear-gradient(to bottom right, #fff, #f8f8f8);
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.placeholder-text {
    color: #999;
    text-align: center;
    font-style: italic;
}

/* Heart Monitor */
.simple-heart-monitor {
    position: relative;
    width: 100%;
    height: 80px;
    background-color: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
    border: 1px solid #eaeaea;
}

.monitor-background {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

.heart-line {
    position: absolute;
    width: 200%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 100' preserveAspectRatio='none'%3E%3Cpath d='M0,50 L100,50 L110,40 L120,50 L130,10 L140,90 L150,50 L160,60 L170,50 L300,50 L310,40 L320,50 L330,10 L340,90 L350,50 L360,60 L370,50 L500,50 L510,40 L520,50 L530,10 L540,90 L550,50 L560,60 L570,50 L600,50' fill='none' stroke='%23ff3333' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    animation: heart-beat 4s linear infinite;
}

.monitor-status {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 12px;
    font-weight: bold;
    color: #333;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 2px 8px;
    border-radius: 12px;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #ff3333;
    border-radius: 50%;
    margin-right: 4px;
    animation: blink 1s infinite;
}

/* Friend Network */
.friend-network {
    position: relative;
    width: 100%;
    height: 300px;
    margin: 20px 0;
    perspective: 1200px;
}

.network-circle {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px dashed rgba(255, 51, 51, 0.3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.friend {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 5;
}

.friend-tooltip {
    position: absolute;
    width: 180px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 10px;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.friend:hover .friend-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.friend:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(255, 51, 51, 0.3);
    border: 2px solid rgba(255, 51, 51, 0.7);
    z-index: 10;
}

/* Success message (thank you page) */
.success-message {
    text-align: center;
    padding: 30px;
    background-color: var(--primary-cloud);
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 5px solid var(--accent-heart);
}

.message-received {
    margin-top: 20px;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.message-field {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.message-field:last-child {
    border-bottom: none;
}

.message-label {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.return-link {
    display: inline-block;
    margin-top: 20px;
    background: linear-gradient(to right, var(--primary-heart), var(--accent-heart));
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.return-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    from {
        transform: rotate(-45deg) translateY(0);
    }

    to {
        transform: rotate(-45deg) translateY(-10px);
    }
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

@keyframes heart-beat {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Specific friend positions */
.friend-1 {
    top: 20%;
    left: 50%;
    transform: translate(-50%, -150%);
}

.friend-2 {
    top: 37%;
    right: 30%;
}

.friend-3 {
    bottom: 20%;
    right: 35%;
}

.friend-4 {
    bottom: 20%;
    left: 35%;
}

.friend-5 {
    top: 37%;
    left: 30%;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .timeline::after {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
    }

    .right {
        left: 0;
    }

    .left::after,
    .right::after {
        left: 20px;
    }
}

.location-image {
    text-align: center;
    margin: 30px auto;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    max-width: 600px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.location-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* General Heading Style */
h1 {
    font-size: 2em;
    margin-bottom: 1rem;
    text-align: center;
    color: #333;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

/* Table Header */
thead {
    background-color: #f7b2d9;
    /* Light pink for visual appeal */
    color: #333;
}

thead th {
    padding: 12px 16px;
    font-weight: bold;
    text-align: center;
    border-bottom: 2px solid #ddd;
}

/* Table Body Rows */
tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease-in-out;
}

tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

tbody td {
    padding: 12px 16px;
    text-align: center;
    color: #555;
}

/* Hover Effect */
tbody tr:hover {
    background-color: #ffe6f0;
}