/* css/style.css */

/* Àü¿ª º¯¼ö */
:root {
    --primary-color: #1e88e5;
    --primary-hover: #1565c0;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --background: #ffffb3;
    --surface: #ffffff;
    --text-primary: #212121;
    --text-secondary: #757575;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --radius: 8px;
}


.container {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Malgun Gothic', '¸¼Àº °íµñ', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 400px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    width: 1000px;
    background-image: url('../img/img_stock/img005.png');
    background-size: auto;
    background-repeat: no-repeat;
}

/* Çì´õ */
.header {
    text-align: center;
    padding: 30px 0 0 0;
}

.main-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-primary);
}

/* °Ë»ö ¼½¼Ç */
.search-section {
    margin-bottom: 30px;
}

.search-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

/* ±×¶óµ¥ÀÌ¼Ç º¸´õ °Ë»öÃ¢ */
.search-box {
    position: relative;
    display: flex;
    background: linear-gradient(90deg, #8f69fa, #4b21ab);
    border-radius: 50px;
    padding: 3px;
    box-shadow: 0 4px 12px rgba(139, 69, 250, 0.25);
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.search-box:hover {
    box-shadow: 0 6px 16px rgba(139, 69, 250, 0.3);
    transform: translateY(-1px);
}

.search-box:focus-within {
    background: linear-gradient(90deg, #8f69fa, #4b21ab, #8f69fa);
    background-size: 200% 100%;
    animation: gradient-flow 3s ease infinite;
    box-shadow: 0 6px 24px rgba(139, 69, 250, 0.4);
}

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

.search-box-inner {
    display: flex;
    background: white;
    border-radius: 48px;
    width: 100%;
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
}

.search-input::placeholder {
    color: #a0a0a0;
}

.search-button {
    width: 0px;
    height: 0px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.search-button i {
    background: linear-gradient(90deg, #8f69fa, #4b21ab);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-button:hover {
    transform: scale(1.1);
}

.search-button:active {
    transform: scale(0.95);
}

.color-info {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.color-box {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.color-sample {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.gradient-sample {
    background: linear-gradient(90deg, #8f69fa, #4b21ab);
}
/*.search-box {
    position: relative;
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
}

.search-input::placeholder {
    color: #9e9e9e;
}

.search-btn {
    width: 50px;
    height: 50px;
    border: none;
    background: transparent;
    color: var(--primary-color) !important;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.search-btn:hover {
    background: rgba(30, 136, 229, 0.1) !important;
}*/

/* ÀÚµ¿¿Ï¼º µå·Ó´Ù¿î */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 10px;
    display: none;
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.autocomplete-dropdown.active {
    display: block;
}

.no-results {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.autocomplete-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.autocomplete-item:hover {
    background: #f5f5f5;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-name {
    font-weight: 500;
}

.autocomplete-code {
    color: var(--text-secondary);
    font-size: 14px;
    margin-left: 8px;
}

.autocomplete-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.loan-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.loan-badge.available {
    background: #e8f5e9;
    color: var(--success-color);
}

.loan-badge.unavailable {
    background: #ffebee;
    color: var(--danger-color);
}

/* °á°ú Ä«µå */
.result-section {
    /*display: none;*/
}

.result-section.show {
    display: block;
}

.result-card {
    background: linear-gradient(to right, #6267df, #6267df 75%);
    border-radius: 20px;
    padding: 0px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stock-title {
    font-size: 24px;
    margin-bottom: 20px;
    padding-top: 30px;
}

#stockName {
    color:#ffffff;
    font-size:30px;
    font-weight:bold;
}

#stockCode {
    color:#ffffff;
    font-size:30px;
    font-weight:bold;
}

.loan-status {
    margin: 20px 0;
}

.status-btn {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: var(--radius);
    cursor: default;
    transition: all 0.3s;
}

.status-btn.available {
    background: #e3f2fd;
    color: var(--primary-color);
}

.status-btn.unavailable {
    background: #ffebee;
    color: var(--danger-color);
}

.message-box {
    /*margin: 30px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: var(--radius);*/
    color:#ffffff;
    font-size:28px;
    border-bottom:1px solid #3d41cf;
}

.message-text {
    /*font-size: 16px;
    line-height: 1.6;
    margin-bottom: 10px;*/
}

.sub-message {
    /*font-size: 14px;
    color: var(--text-secondary);*/
}

.contact-box {
    padding-top: 30px;
    border-top:1px solid #8389da;
    padding-bottom: 30px;
}

.contact-btn {
    display: inline-block;
    color:#ffffff !important;
    font-size:30px;
    font-weight:bold;
    text-decoration: none;
    transition: background 0.3s;
}

/*.contact-btn:hover {
    background: var(--primary-hover);
}*/

/* °á°ú ¾øÀ½ */
.no-result-section {
    display: block;  /* ÃÊ±â »óÅÂ¿¡¼­ Ç¥½Ã */
}

.no-result-section.hide {
    display: none;
}

.no-result-card {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow);
    max-width: 500px;
    margin: 0 auto;
}

.no-result-card i {
    font-size: 48px;
    color: #bdbdbd;
    margin-bottom: 20px;
}

.no-result-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.no-result-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ÀÎ±â °Ë»ö Á¾¸ñ */
.quick-search {
    margin-top: 30px;
    text-align: center;
}

.quick-search h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-weight: normal;
}

.popular-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.tag {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ÃÖ±Ù °Ë»ö ±â·Ï */
.recent-searches {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.recent-searches.hide {
    display: none;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h3 {
    font-size: 16px;
    color: var(--text-primary);
    margin: 0;
    text-align: left;
}

.clear-history-btn {
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.clear-history-btn:hover {
    background: #e0e0e0;
    color: var(--text-primary);
}

.recent-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.recent-tags .recent-search-item {
    padding: 8px 16px;
    padding-right: 35px;
    background: #f0f4f8;
    border: 1px solid #d0dae4;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    color: var(--text-primary);
}

.recent-tags .recent-search-item:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.delete-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
}

.recent-search-item:hover .delete-btn {
    color: white;
}

.recent-tags-empty {
    color: var(--text-secondary);
    font-size: 14px;
    padding: 20px;
}

/* ÀÎ±â °Ë»ö */
.popular-searches {
    margin-top: 20px;
}

.popular-searches h3 {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

/* ·Îµù ¿À¹ö·¹ÀÌ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 30px 50px;
    border-radius: var(--radius);
    text-align: center;
}

.loading-spinner i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.loading-spinner p {
    font-size: 16px;
}

.stock-name {
    font-weight: 600;
    color: #333;
    font-size: 15px;
    margin-bottom: 3px;
}

.stock-code {
    color: #666;
    font-size: 13px;
}

.highlight {
    background-color: #fff3cd;
    font-weight: bold;
}

/* ¹ÝÀÀÇü µðÀÚÀÎ */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .main-title {
        font-size: 20px;
    }
    
    .search-input {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .result-card {
        padding: 20px;
    }
    
    .stock-title {
        font-size: 20px;
    }
    
    .message-text {
        font-size: 14px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .clear-history-btn {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 18px;
    }
    
    .popular-tags {
        gap: 8px;
    }
    
    .tag {
        padding: 6px 12px;
        font-size: 12px;
    }
}
