/* 기본 스타일 */
body {
    background-color: #0d0d0d;
    /* 어두운 배경 */
    color: #00ff00;
    /* 매트릭스 녹색 텍스트 */
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
}

.header-nav {
    display: flex;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-left .logo {
    width: 60px;
    margin-right: 15px;
}

.header-left h1 {
    font-size: 2em;
    margin: 0;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}
.header-nav a {
    text-decoration: none;
    margin: 0 15px;
    color: #ffffff;
    font-weight: 600;
    transition: color 0.3s, background-color 0.3s;
    padding: 8px 12px;
    border-radius: 5px;
    background-color: rgba(0, 123, 255, 0.1);
}

.header-nav a.active,
.header-nav a:hover {
    background-color: #007bff;
    color: #ffffff;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: rgba(0, 0, 0, 0.9);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1002;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}



main {
    padding-top: 100px;
    /* 헤더 공간 확보 */
    padding-bottom: 120px;
    /* 고정 광고 공간 확보 */
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.section {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.responsive-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .responsive-row {
        flex-direction: row;
    }

    .recommendation-section,
    .recommended-coin-chart-section {
        flex: 1;
    }

    .recommendation-section {
        margin-right: 10px;
    }

    .recommended-coin-chart-section {
        margin-left: 10px;
    }
}

.highlight {
    font-weight: bold;
    color: #007bff;
}

/* 거래소 선택 박스 */
.exchange-selector-box {
    display: inline-flex;
    align-items: center;
    background-color: #f0f4ff;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 2px solid #007bff;
}

.exchange-label {
    font-weight: 600;
    margin-right: 10px;
    color: #0056b3;
}

/* 거래소 <select> 스타일 */
.exchange-selector {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    background-color: #fff;
}

.exchange-selector:hover {
    border-color: #007bff;
}

/* 버튼, 스피너 */
.recommendation-trigger {
    text-align: center;
    margin-bottom: 20px;
}

.random-recommendation-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-left: 10px;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    outline: none;
    background-color: #17a2b8;
}

.random-recommendation-btn .btn-icon {
    margin-left: 10px;
    transition: transform 0.3s;
}

.random-recommendation-btn:hover {
    background-color: #138496;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.random-recommendation-btn:hover .btn-icon {
    transform: rotate(360deg);
}

.random-recommendation-btn.special {
    background-color: #ffc107;
    color: #333333;
}

.random-recommendation-btn.special:hover {
    background-color: #e0a800;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 추천 카드 */
.recommendation-card {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.8);;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    align-items: center;
}

.recommendation-card.show {
    display: flex;
    opacity: 1;
}

.recommendation-info {
    font-size: 16px;
    margin-bottom: 10px;
}

.recommendation-summary {
    text-align: right;
    font-size: 16px;
}

/* Empty View 스타일 */
.empty-view {
    font-size: 16px;
    color: #777;
    text-align: center;
    margin: 20px 0;
}

/* 추천 코인 차트 섹션 */
.recommended-coin-chart-section .chart-container {
    position: relative;
    height: 400px;
    /* Plotly.js 차트를 위한 충분한 높이 설정 */
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);;
    /* 차트가 비어있을 때 배경색 */
    border-radius: 8px;
    padding: 10px;
    box-sizing: border-box;
}

/* 게시글 작성 버튼 스타일 */
.write-post-btn {
    display: inline-block;
    padding: 10px 20px;
    margin-bottom: 15px;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.write-post-btn:hover {
    background-color: #218838;
}

/* 게시글 작성 모달 스타일 */
#write-post-modal .modal-content {
    max-width: 500px;
    text-align: left;
}

#write-post-form {
    display: flex;
    flex-direction: column;
}

#write-post-form label {
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: 600;
}

#write-post-form input,
#write-post-form textarea {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

#write-post-form input:focus,
#write-post-form textarea:focus {
    border-color: #007bff;
    outline: none;
}

.action-btn {
    padding: 10px 20px;
    margin: 15px 5px 0 0;
    background-color: #007bff;
    /* 게시글 작성: 파란색 */
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.action-btn:hover {
    opacity: 0.9;
}

/* 매도 버튼 스타일 (추가된 부분) */
#confirm-sell-btn {
    background-color: #dc3545;
    /* 매도: 빨간색 */
}

#confirm-sell-btn:hover {
    opacity: 0.9;
}

/* 모달 스타일 */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1000;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.5);
    /* Black w/ opacity */
}

.modal-content {
    background-color: #424143;
    margin: 10% auto;
    /* 10% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    /* Could be more or less, depending on screen size */
    border-radius: 8px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

/* 로그인 모달 추가 스타일 */
#login-modal .modal-content {
    max-width: 400px;
    text-align: center;
}

.login-btn {
    width: 100%;
    padding: 10px 0;
    margin: 10px 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.login-btn.google {
    background-color: #4285F4;
    color: #fff;
}

.login-btn.google:hover {
    background-color: #357ae8;
}

.community-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.community-posts li {
    background-color: #ffffff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.community-posts li:hover {
    background-color: #f0f8ff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.community-posts li h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #007bff;
}

.community-posts li p {
    margin: 0 0 10px 0;
    color: #555;
}

.post-meta {
    font-size: 14px;
    color: #999;
}


/* 투표 섹션 스타일 */
.voting-section p {
    margin-bottom: 10px;
    font-weight: 600;
}

.vote-btn {
    padding: 10px 20px;
    margin-right: 10px;
    background-color: #17a2b8;
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.vote-btn:hover {
    background-color: #138496;
}

/* 투표 완료 메시지 스타일 */
.vote-message {
    color: #28a745;
    font-weight: 600;
}

/* 어제의 추천 코인 결과 섹션 스타일 */
.yesterday-recommendation-card {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    flex-direction: column;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
}

.yesterday-recommendation-card.show {
    display: flex;
    opacity: 1;
}

.yesterday-recommendation-info h3,
.yesterday-recommendation-info p {
    margin: 5px 0;
}

.yesterday-prediction-summary p {
    font-weight: 600;
    color: #007bff;
}

/* 고정 광고 스타일 */
.fixed-ad {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    /* 배경색 (필요에 따라 조정) */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    /* 약간의 그림자 추가 (옵션) */
    z-index: 1000;
    /* 다른 요소들보다 위에 표시되도록 설정 */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 320px;
    /* 모바일 광고 너비 */
    height: 100px;
    /* 모바일 광고 높이 */
}

/* 반응형 디자인을 고려하여 모바일 광고만 표시 */
@media (max-width: 768px) {
    .fixed-ad {
        width: 320px;
        height: 100px;
        left: 50%;
        transform: translateX(-50%);
    }
}/* 추가: 고정 광고가 다른 콘텐츠를 가리지 않도록 메인 콘텐츠에 여백 추가 */
main {
    padding-bottom: 120px;
    /* 광고 높이 + 여유 공간 */
}

.decision-helper-section {
    display: none;
}

.coin-list-helper-sectio {
    display: none;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: center;
        padding: 10px 00px;
    }

    .header-left {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin-bottom: 10px;
    }

    .header-left .logo {
        width: 40px;
        margin-bottom: 5px;
    }

    .header-left h1 {
        font-size: 20px;
        margin: 0;
    }

    .header-nav {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-nav a {
        margin: 5px 10px;
        font-size: 12px;
        padding: 8px 10px;
        border-radius: 5px;
        background-color: rgba(0, 123, 255, 0.1);
        transition: background-color 0.3s, color 0.3s;
    }

    .header-nav a:hover,
    .header-nav a.active {
        background-color: #007bff;
        color: #ffffff;
    }

    #dark-mode-btn {
        display: none;
    }

    .floating-button {
        width: 50px;
        height: 50px;
        font-size: 12px;
        margin-top: 10px;
    }

}

@media (max-width: 480px) {
    .header-nav a {
        font-size: 12px;
        padding: 6px 10px;
    }

    .header-left h1 {
        font-size: 18px;
    }

}

/* Warning Modal Specific Styles */
/* Warning Modal Specific Styles */
#warning-modal {
    position: fixed;
    top: 120px;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* 반투명 배경 */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#warning-modal .modal-content {
    max-width: 90%;
    /* 모달의 가로 최대 크기 */
    max-height: 60%;
    /* 모달의 세로 최대 크기 */
    overflow-y: auto;
    /* 세로 스크롤 활성화 */
    padding: 20px;
    background-color: black;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-align: left;
}

#warning-modal .modal-content h2 {
    margin-bottom: 15px;
    font-size: 18px;
    /* 모바일 환경에 적합한 글자 크기 */
}

#warning-modal .modal-content p {
    margin: 10px 0;
    font-size: 14px;
    /* 글자 크기 조정 */
    line-height: 1.5;
    /* 읽기 편한 줄 간격 */
}

#warning-modal .modal-content label {
    display: flex;
    align-items: center;
    margin: 15px 0;
    font-weight: 600;
}

#warning-modal .modal-content label input {
    margin-right: 10px;
}

#warning-modal .modal-content button {
    margin-top: 15px;
    padding: 10px 15px;
    font-size: 14px;
    border: none;
    border-radius: 5px;
    background-color: #007BFF;
    color: white;
    cursor: pointer;
}

#warning-modal .modal-content button:hover {
    background-color: #0056b3;
}

#agree-btn {
    background-color: #28a745;
    /* 녹색 버튼 */
    color: #fff;
}

#agree-btn:hover {
    background-color: #218838;
}