@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    --primary: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --accent: #10b981;
    --accent-light: #34d399;
    --danger: #ef4444;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-main: #020617;
    --bg-card: #0f172a;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #1e293b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Pretendard', -apple-system, sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Glassmorphism Header */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(var(--bg-card), 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: '🏠';
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

#theme-toggle {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

#theme-toggle:hover {
    transform: scale(1.05);
    background: var(--primary-dark);
}

/* Hero Section 2.0 */
.hero {
    position: relative;
    padding: 10rem 1.5rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: white;
    overflow: hidden;
    text-align: center;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://www.transparenttextures.com/patterns/cubes.png');
    opacity: 0.1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 99px;
    font-weight: 800;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.4);
    background: var(--accent-light);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 1.5rem;
    flex: 1;
}

/* Section Title */
.section-title {
    margin-bottom: 3rem;
    text-align: left;
}

.section-title h2 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* Property Grid */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 2.5rem;
}

.property-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-image {
    height: 240px;
    background: linear-gradient(45deg, #e2e8f0, #cbd5e1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.4));
}

.card-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.9);
    color: var(--primary);
    font-weight: 800;
    font-size: 0.75rem;
    border-radius: 99px;
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.card-content {
    padding: 2rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-score {
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.85rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-price-info {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-main);
    border-radius: var(--radius-md);
}

.price-item {
    display: flex;
    flex-direction: column;
}

.price-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.price-item strong {
    font-size: 1.1rem;
    color: var(--text-main);
}

.price-item.profit strong {
    color: var(--danger);
}

.btn-detail {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-detail:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

/* Content Sections */
.content-section {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 4rem;
}

.content-section h2 {
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

.detail-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.detail-item {
    padding: 2rem;
    background: var(--bg-main);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.detail-item h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Calendar Styling 2.1 */
.calendar-section {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--border);
    gap: 1px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.calendar-day-header {
    background: #f1f5f9;
    padding: 1.5rem;
    text-align: center;
    font-weight: 900;
    color: var(--primary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

[data-theme="dark"] .calendar-day-header {
    background: #1e293b;
    color: #f1f5f9;
}

.calendar-day {
    background: var(--bg-card);
    min-height: 160px;
    padding: 1.2rem;
    position: relative;
    transition: var(--transition);
}

.calendar-day.empty {
    background: var(--bg-main);
}

.day-number {
    font-weight: 900;
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    display: block;
}

.event-tag {
    margin-top: 0.6rem;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    color: white !important; /* Force visibility */
    cursor: pointer !important;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.event-tag:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
    z-index: 10;
}

.event-tag.special { background: linear-gradient(135deg, #f59e0b, #d97706); }
.event-tag.priority-1 { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.event-tag.priority-2 { background: linear-gradient(135deg, #10b981, #059669); }
.event-tag.unranked { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.remind-me {
    cursor: pointer;
    padding: 2px;
    font-size: 1rem;
    transition: var(--transition);
}

.remind-me:hover {
    transform: scale(1.3);
}

/* Analysis Card Integration */
.analysis-card {
    margin-top: 3rem;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 6rem 1.5rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 5rem;
    margin-bottom: 5rem;
}

.footer-info h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-info p {
    opacity: 0.6;
    max-width: 400px;
    font-size: 0.95rem;
}

.footer-links h4 {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: white;
}

.footer-links nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
}

.footer-links a {
    color: white;
    opacity: 0.6;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    padding-left: 5px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.4;
}

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .nav-links { display: none; }
    .property-grid { grid-template-columns: 1fr; }
    .hero { padding: 6rem 1.5rem; }
}