/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background-color: #f5f5f0;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border-bottom: 4px solid #c9a961;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-top {
    padding: 20px 0 10px;
    text-align: center;
}

.header-top h1 {
    font-size: 2.5em;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tagline {
    font-size: 1.1em;
    color: #c9a961;
    font-style: italic;
}

nav {
    background-color: #1a252f;
    margin-top: 10px;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav li {
    margin: 0;
}

nav a {
    display: block;
    padding: 12px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: background-color 0.3s;
    border-bottom: 3px solid transparent;
}

nav a:hover,
nav a.active {
    background-color: #2c3e50;
    border-bottom-color: #c9a961;
}

/* Main Content Layout */
.main-content {
    display: flex;
    gap: 20px;
    padding: 30px 0;
    min-height: calc(100vh - 300px);
}

.sidebar {
    flex: 0 0 280px;
}

.content {
    flex: 1;
    background: white;
    padding: 25px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.content.full-width {
    flex: 1;
}

/* Sidebar Boxes */
.search-box,
.filter-box,
.info-box {
    background: white;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.search-box h3,
.filter-box h3,
.info-box h3 {
    font-size: 1.1em;
    margin-bottom: 10px;
    color: #2c3e50;
    border-bottom: 2px solid #c9a961;
    padding-bottom: 5px;
}

.search-box input,
.filter-box select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    font-size: 0.95em;
}

.search-box button {
    width: 100%;
    padding: 10px;
    background: #2c3e50;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #34495e;
}

.info-box p {
    font-size: 0.9em;
    margin-bottom: 8px;
}

/* Intro Section */
.intro-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #c9a961;
}

.intro-section h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.intro-section p {
    color: #555;
    font-size: 1.05em;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: space-around;
    background: #ecf0f1;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #ddd;
    text-align: center;
}

.stat-item {
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #2c3e50;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #7f8c8d;
    text-transform: uppercase;
}

/* Coins Grid */
.coins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.coin-card {
    background: white;
    border: 1px solid #ddd;
    padding: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.coin-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #c9a961;
}

.coin-card-header {
    border-bottom: 2px solid #c9a961;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.coin-card h3 {
    color: #2c3e50;
    font-size: 1.2em;
    margin-bottom: 5px;
}

.coin-card .category {
    font-size: 0.85em;
    color: #7f8c8d;
    text-transform: uppercase;
}

.coin-card .branch {
    font-size: 0.9em;
    color: #555;
    font-style: italic;
}

.coin-specs {
    margin: 10px 0;
    font-size: 0.9em;
    color: #555;
}

.coin-specs p {
    margin: 5px 0;
}

.coin-price {
    background: #ecf0f1;
    padding: 10px;
    margin-top: 10px;
    border-left: 3px solid #c9a961;
}

.coin-price-label {
    font-size: 0.85em;
    color: #7f8c8d;
    text-transform: uppercase;
}

.coin-price-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #27ae60;
}

.coin-price-range {
    font-size: 0.85em;
    color: #555;
    margin-top: 5px;
}

/* Coin Detail Page */
.breadcrumb {
    padding: 15px 0;
    font-size: 0.9em;
    color: #7f8c8d;
}

.breadcrumb a {
    color: #2c3e50;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.coin-detail-container {
    background: white;
}

.coin-detail-header {
    border-bottom: 3px solid #c9a961;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.coin-detail-header h1 {
    color: #2c3e50;
    font-size: 2.2em;
    margin-bottom: 10px;
}

.coin-meta {
    display: flex;
    gap: 20px;
    font-size: 0.95em;
    color: #555;
}

.coin-meta-item {
    padding: 5px 10px;
    background: #ecf0f1;
    border-radius: 3px;
}

.coin-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.coin-detail-section {
    background: #f9f9f9;
    padding: 20px;
    border: 1px solid #ddd;
}

.coin-detail-section h2 {
    color: #2c3e50;
    font-size: 1.4em;
    margin-bottom: 15px;
    border-bottom: 2px solid #c9a961;
    padding-bottom: 8px;
}

.spec-table {
    width: 100%;
}

.spec-table tr {
    border-bottom: 1px solid #ddd;
}

.spec-table td {
    padding: 10px 5px;
}

.spec-table td:first-child {
    font-weight: bold;
    color: #2c3e50;
    width: 40%;
}

.price-box {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    padding: 25px;
    text-align: center;
    border-radius: 5px;
    margin: 20px 0;
}

.price-box h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    border: none;
    color: white;
}

.current-price {
    font-size: 3em;
    font-weight: bold;
    margin: 15px 0;
}

.price-range-display {
    font-size: 1.1em;
    margin-top: 10px;
}

.price-info {
    font-size: 0.9em;
    margin-top: 15px;
    opacity: 0.9;
}

.back-link {
    margin-top: 30px;
}

.back-link a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.1em;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 4px solid #c9a961;
}

footer a {
    color: #c9a961;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        flex: 1;
    }
    
    .coins-grid {
        grid-template-columns: 1fr;
    }
    
    .coin-detail-content {
        grid-template-columns: 1fr;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        flex-direction: column;
    }
}
