/* Search Container Styles */
.search-container {
    position: relative;
    max-width: 500px;
    width: 100%;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-container.initial {
    max-width: 800px;
    margin: 0 auto;
}

.initial-state .search-container {
    width: 90%;
    max-width: 800px;
    position: relative;
    z-index: 10;
}

/* Header Content Styles */
.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 2rem;
}

.header-right {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
    gap: 1rem;
}

.header-content .search-container {
    flex: 1;
    max-width: 600px;
}

.search-box {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.search-box:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.initial-state .search-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Search Box Input Styles */
.header-content .search-box {
    display: flex;
    width: 100%;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content .search-box input {
    flex: 1;
    height: 48px;
    padding: 0 1.5rem;
    border: none;
    background: white;
    color: #333;
    font-size: 1rem;
}

.header-content .search-box input::placeholder {
    color: #666;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    color: #333;
    outline: none;
}

.initial-state .search-box input {
    flex: 1;
    height: 50px;
    padding: 0 1.5rem;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    color: #333;
    outline: none;
}

.search-box input::placeholder {
    color: #666;
}

/* Button Styles */
.header-content .search-button {
    padding: 0 1.5rem;
    height: 48px;
    background: white;
    border: none;
    color: #4B3F72;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-content .search-button:hover {
    background: #f5f5f5;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.request-button {
    height: 48px;
    padding: 0 1.5rem;
    background: white;
    border: none;
    border-radius: 50px;
    color: #4B3F72;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    white-space: nowrap;
}

.request-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Autocomplete Styles */
.autocomplete-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.autocomplete-item {
    padding: 1rem 1.5rem;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.autocomplete-item:first-child {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.autocomplete-item:last-child {
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

.autocomplete-item:hover {
    background-color: rgba(75, 63, 114, 0.1);
}

/* Word Entry Styles */
.word-entry {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.word-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.word-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.word-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.word-title {
    font-size: 1.6rem;
    color: #4B3F72;
    font-weight: 700;
}

.word-class {
    color: #1F3A8C;
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    background: rgba(31, 58, 140, 0.1);
    border-radius: 20px;
}

.word-ipa {
    color: #666;
    font-style: italic;
}

.button-group {
    display: flex;
    gap: 0.5rem;
}

/* Audio and Share Button Styles */
.sound-button,
.share-button {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(75, 63, 114, 0.1);
    color: #4B3F72;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sound-button:hover,
.share-button:hover {
    background: rgba(75, 63, 114, 0.2);
    transform: scale(1.1);
}

/* Word Content Styles */
.word-content {
    padding: 2rem;
    display: none;
}

.word-entry.expanded .word-content {
    display: block;
}

.word-meaning {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 1.5rem;
}

.word-example {
    background: rgba(75, 63, 114, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    color: #333;
    margin-bottom: 1.5rem;
}

/* Video Container Styles */
.word-video {
    background: rgba(31, 58, 140, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
}

.video-title {
    color: #4B3F72;
    font-weight: 600;
    margin-bottom: 1rem;
}

.word-video video {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.video-source {
    font-size: 0.9rem;
    color: #666;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        padding: 1rem;
    }

    .header-right {
        width: 100%;
        flex-direction: column;
        gap: 0.8rem;
    }

    .header-content .search-container {
        width: 100%;
        max-width: none;
    }

    .word-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .word-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .button-group {
        justify-content: center;
    }

    .request-button {
        width: 100%;
        justify-content: center;
    }
}

/* Share Dropdown Styles */
.share-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    display: none;
    z-index: 1000;
    min-width: 180px;
}

.share-button.active + .share-dropdown {
    display: block;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    color: #333;
    text-decoration: none;
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.share-option:hover {
    background-color: rgba(75, 63, 114, 0.1);
}

.share-option i {
    font-size: 1.2rem;
}

.share-option.discord i { color: #7289DA; }
.share-option.instagram i { color: #E1306C; }
.share-option.kakao i { color: #FAE100; }
.share-option.twitter i { color: #1DA1F2; }
