:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --text-color: #2c3e50;
    --light-gray: #ecf0f1;
    --medium-gray: #bdc3c7;
    --dark-gray: #7f8c8d;
    --white: #ffffff;
    --positive-color: #27ae60;
    --negative-color: #e74c3c;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #f7f9fc;
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: var(--transition);
}

a:hover {
    color: #2980b9;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.logo-icon {
    background-color: var(--secondary-color);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
}

.search-container {
    display: flex;
    width: 40%;
    max-width: 500px;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 0.9rem;
    outline: none;
}

.search-container button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-container button:hover {
    background-color: #c0392b;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
}

.nav-links .member-btn {
    background-color: var(--white);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    transition: var(--transition);
}

.nav-links .member-btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.sub-nav {
    border-top: 1px solid var(--light-gray);
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sub-nav::-webkit-scrollbar {
    display: none;
}

.sub-nav-content {
    display: flex;
    padding: 10px 0;
}

.sub-nav-content a {
    margin-right: 30px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.sub-nav-content a.active {
    color: var(--accent-color);
    font-weight: 700;
}

/* Main Content Styles */
.ticker-section {
    padding: 30px 0 20px;
}

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

.ticker-info h1 {
    font-size: 2.2rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.ticker-info p {
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.ticker-price {
    text-align: right;
}

.price-value {
    font-size: 2.2rem;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.price-change {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
}

.positive {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--positive-color);
}

.negative {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--negative-color);
}

/* Main content grid */
.main-content {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

/* Chart Section */
.chart-section {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.chart-period {
    display: flex;
    gap: 5px;
}

.period-btn {
    background-color: var(--light-gray);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.period-btn:hover {
    background-color: var(--medium-gray);
}

.period-btn.active {
    background-color: var(--accent-color);
    color: var(--white);
}

.chart-container {
    height: 400px;
    padding: 20px;
    position: relative;
}

.chart-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    pointer-events: none;
    display: none;
    font-size: 0.9rem;
    z-index: 1000;
}

.tooltip-date {
    font-weight: 600;
    margin-bottom: 5px;
}

.tooltip-price {
    margin-bottom: 5px;
}

.tooltip-change {
    font-weight: 600;
}

/* Stock Info Panel */
.stock-info {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.info-header {
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.info-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.info-content {
    padding: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
}

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

.info-label {
    font-weight: 500;
    color: var(--dark-gray);
}

.info-value {
    font-weight: 600;
}

/* News Section */
.news-section {
    margin: 30px 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.news-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-image {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--dark-gray);
}

.card-excerpt {
    font-size: 0.95rem;
    margin-bottom: 15px;
    color: var(--text-color);
    line-height: 1.5;
}

.read-more {
    font-weight: 600;
    color: var(--accent-color);
    display: inline-block;
}

/* Comments Section */
.comments-section {
    margin: 30px 0;
}

.comments-container {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.comments-list {
    margin-top: 20px;
}

.comment {
    padding: 20px 0;
    border-bottom: 1px solid var(--light-gray);
}

.comment:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
}

.comment-date {
    font-size: 0.85rem;
    color: var(--dark-gray);
}

.comment-text {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    font-size: 0.85rem;
    color: var(--dark-gray);
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    color: var(--accent-color);
}

.new-comment {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--light-gray);
}

.comment-form {
    display: flex;
    flex-direction: column;
}

.comment-form textarea {
    padding: 15px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.95rem;
}

.submit-btn {
    align-self: flex-end;
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.submit-btn:hover {
    background-color: #2980b9;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 40px 0;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column a {
    color: var(--medium-gray);
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--white);
}

.copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: var(--medium-gray);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

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

    .nav-links {
        justify-content: space-between;
    }

    .ticker-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .ticker-price {
        text-align: left;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
}