/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 1.8rem;
    color: blueviolet;
    margin-bottom: 1rem;
    text-align: center;
}

nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

main {
    flex: 1;
    overflow: hidden;
}

.view {
    display: none;
    height: 100%;
}

.view.active {
    display: block;
}

/* Floating View */
.floating-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 250px);
    overflow: hidden;
}

.floating-card {
    background-color: none;
    position: absolute;
    padding: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    animation: float 6s ease-in-out infinite;
}

.floating-card:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 10;
}

.floating-card .img-container {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 0.5rem;
    transition: box-shadow 0.3s;
}

.floating-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.floating-card .card-info {
    text-align: center;
}

.floating-card .card-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.floating-card .card-work {
    font-size: 0.9rem;
    color: #fff;
}

/* Sentiment Colors */
.floating-card.sentiment-positive .img-container {
    box-shadow: 0 0 15px 5px rgba(40, 167, 69, 0.6); /* Green */
}
.floating-card.sentiment-negative .img-container {
    box-shadow: 0 0 15px 5px rgba(220, 53, 69, 0.6); /* Red */
}
.floating-card.sentiment-neutral .img-container {
    box-shadow: 0 0 15px 5px rgba(108, 117, 125, 0.6); /* Gray */
}

.list-card.sentiment-positive {
    box-shadow: 0 0 20px 5px rgba(40, 167, 69, 0.5); /* Green */
}
.list-card.sentiment-negative {
    box-shadow: 0 0 20px 5px rgba(220, 53, 69, 0.5); /* Red */
}
.list-card.sentiment-neutral {
    box-shadow: 0 0 20px 5px rgba(108, 117, 125, 0.5); /* Gray */
}

.list-card.sentiment-positive:hover {
    box-shadow: 0 10px 30px 5px rgba(40, 167, 69, 0.7);
}
.list-card.sentiment-negative:hover {
    box-shadow: 0 10px 30px 5px rgba(220, 53, 69, 0.7);
}
.list-card.sentiment-neutral:hover {
    box-shadow: 0 10px 30px 5px rgba(108, 117, 125, 0.7);
}

.floating-card.sentiment-positive .card-name,
.list-card.sentiment-positive .card-name {
    color: #28a745;
}
.floating-card.sentiment-negative .card-name,
.list-card.sentiment-negative .card-name {
    color: #dc3545;
}
.floating-card.sentiment-neutral .card-name,
.list-card.sentiment-neutral .card-name {
    color: #6c757d;
}

.floating-card.sentiment-positive .card-work {
    color: #5cb85c; /* Lighter green */
}
.floating-card.sentiment-negative .card-work  {
    color: #d9534f; /* Lighter red */
}
.floating-card.sentiment-neutral .card-work {
    color: #868e96; /* Lighter gray */
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-20px) translateX(10px);
    }
    50% {
        transform: translateY(-10px) translateX(-10px);
    }
    75% {
        transform: translateY(-30px) translateX(5px);
    }
}

/* List View */
.list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.list-card {
    background: white;
    border-radius: 15px;
    /* box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2); */
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.list-card:hover {
    transform: translateY(-5px);
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); */
}

.list-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.list-card .card-info {
    padding: 1.5rem;
}

.list-card .card-name {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.list-card .card-work {
    font-size: 1rem;
    color: #666;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem 2rem;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    margin-top: auto;
}

footer p {
    color: #764ba2;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.4rem;
    }

    nav {
        flex-direction: column;
    }

    .list-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .floating-card {
        width: 150px;
    }

    .floating-card img {
        height: 150px;
    }
}
