/* Guide-specific styles - extends common.css */

/* Guide Hero Section */
.guide-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.guide-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.guide-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.guide-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.guide-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.guide-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.guide-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.meta-item i {
    font-size: 1.1rem;
}

/* Guide Content Layout */
.guide-content {
    padding: 60px 0;
    background: #f8f9fa;
}

.guide-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
}

/* Guide Sidebar */
.guide-sidebar {
    position: relative;
}

.sidebar-sticky {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 90px !important;
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-self: start;
    z-index: 10;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding-right: 5px;
}

/* 自定义滚动条样式 */
.sidebar-sticky::-webkit-scrollbar {
    width: 6px;
}

.sidebar-sticky::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.sidebar-sticky::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.sidebar-sticky::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
}

.table-of-contents {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.table-of-contents h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.table-of-contents h3 i {
    color: #667eea;
    font-size: 1rem;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 8px;
    position: relative;
}

.table-of-contents li:last-child {
    margin-bottom: 0;
}

.table-of-contents a {
    color: #4a5568;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    line-height: 1.5;
}

.table-of-contents a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0 2px 2px 0;
    transition: height 0.3s ease;
}

.table-of-contents a:hover {
    background: linear-gradient(90deg, #f7fafc 0%, #ffffff 100%);
    color: #667eea;
    padding-left: 18px;
}

.table-of-contents a:hover::before {
    height: 100%;
}

.table-of-contents a:active {
    transform: scale(0.98);
}

.quick-action-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 25px;
    border-radius: 12px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
    position: relative;
    overflow: hidden;
}

.quick-action-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.action-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 1.8rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.quick-action-card:hover .action-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.35);
}

.quick-action-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.quick-action-card p {
    font-size: 0.95rem;
    opacity: 0.95;
    margin-bottom: 20px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.quick-action-card .btn {
    background: white;
    color: #667eea;
    width: 100%;
    justify-content: center;
    font-weight: 600;
    padding: 12px 20px;
    position: relative;
    z-index: 1;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.quick-action-card .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

.quick-action-card .btn i {
    transition: transform 0.3s ease;
}

.quick-action-card .btn:hover i {
    transform: translateX(4px);
}

/* Guide Main Content */
.guide-main {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.featured-image {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 40px;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-section {
    margin-bottom: 50px;
}

.content-section h2 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.content-section h2 i {
    color: #667eea;
}

.lead {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 25px;
}

/* Info Boxes */
.info-box {
    display: flex;
    gap: 20px;
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
}

.info-box.info {
    background: #ebf8ff;
    border-left: 4px solid #3182ce;
}

.info-box.success {
    background: #f0fff4;
    border-left: 4px solid #38a169;
}

.info-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.info-box.info .info-icon {
    color: #3182ce;
}

.info-box.success .info-icon {
    color: #38a169;
}

.info-content h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #2d3748;
}

.info-content p {
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.benefit-card {
    background: #f7fafc;
    padding: 25px;
    border-radius: 12px;
    transition: all 0.3s;
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.benefit-card h3 {
    font-size: 1.2rem;
    color: #2d3748;
    margin-bottom: 10px;
}

.benefit-card p {
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

/* Score Table */
.score-table {
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.score-row {
    display: grid;
    grid-template-columns: 100px 150px 120px 1fr;
    gap: 20px;
    padding: 20px;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.score-row:last-child {
    border-bottom: none;
}

.score-range {
    font-weight: 700;
    font-size: 1.1rem;
}

.score-level {
    font-weight: 600;
}

.score-grade {
    color: #718096;
}

.score-example {
    color: #4a5568;
    font-size: 0.95rem;
}

.score-very-easy { background: #c6f6d5; }
.score-easy { background: #9ae6b4; }
.score-fairly-easy { background: #fef5e7; }
.score-standard { background: #bee3f8; }
.score-fairly-difficult { background: #fbd38d; }
.score-difficult { background: #fc8181; }
.score-very-difficult { background: #feb2b2; }

/* Tips List */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
}

.tip-item {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: #f7fafc;
    border-radius: 12px;
    transition: all 0.3s;
}

.tip-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tip-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.tip-content h3 {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 12px;
}

.tip-content p {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 15px;
}

.tip-example {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.example-bad,
.example-good {
    padding: 15px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.example-bad {
    background: #fff5f5;
    border-left: 3px solid #fc8181;
}

.example-good {
    background: #f0fff4;
    border-left: 3px solid #68d391;
}

/* Word Swaps */
.word-swaps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.swap-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    font-size: 0.95rem;
}

.swap-complex {
    color: #e53e3e;
    font-weight: 600;
}

.swap-simple {
    color: #38a169;
    font-weight: 600;
}

.swap-item i {
    color: #a0aec0;
}

/* Comparison Box */
.comparison-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.comparison-before,
.comparison-after {
    padding: 25px;
    border-radius: 12px;
}

.comparison-before {
    background: #fff5f5;
    border: 2px solid #fc8181;
}

.comparison-after {
    background: #f0fff4;
    border: 2px solid #68d391;
}

.comparison-before h4,
.comparison-after h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.comparison-before h4 {
    color: #c53030;
}

.comparison-after h4 {
    color: #2f855a;
}

.comparison-before p,
.comparison-after p {
    color: #2d3748;
    line-height: 1.7;
    margin: 0;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.tool-card-mini {
    background: #f7fafc;
    padding: 25px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tool-card-mini:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.tool-icon-mini {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.tool-card-mini h4 {
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 8px;
}

.tool-card-mini p {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 50px;
    border-radius: 16px;
    text-align: center;
    margin: 50px 0;
    color: white;
}

.cta-content h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.cta-content p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 25px;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Related Guides */
.related-guides {
    margin-top: 50px;
    padding-top: 50px;
    border-top: 2px solid #e2e8f0;
}

.related-guides h3 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.related-card {
    background: #f7fafc;
    padding: 25px;
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    gap: 20px;
    align-items: center;
    transition: all 0.3s;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.related-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.related-card h4 {
    font-size: 1.2rem;
    color: #2d3748;
    margin-bottom: 5px;
}

.related-card p {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .guide-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-sticky {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 768px) {
    .guide-hero {
        padding: 60px 0 40px;
    }

    .guide-hero h1 {
        font-size: 2rem;
    }

    .guide-subtitle {
        font-size: 1.1rem;
    }

    .guide-meta {
        gap: 15px;
    }

    .guide-main {
        padding: 25px;
    }

    .featured-image {
        height: 250px;
    }

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

    .score-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

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

    .comparison-box {
        grid-template-columns: 1fr;
    }

    .word-swaps {
        grid-template-columns: 1fr;
    }

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

    .sidebar-sticky {
        grid-template-columns: 1fr;
    }

    .cta-section {
        padding: 30px 20px;
    }

    .cta-content h3 {
        font-size: 1.5rem;
        flex-direction: column;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Active Table of Contents Link */
.table-of-contents a.active {
    background: linear-gradient(90deg, #f0f4ff 0%, #ffffff 100%);
    color: #667eea;
    font-weight: 600;
    padding-left: 18px;
}

.table-of-contents a.active::before {
    height: 100%;
}

/* Enhanced Focus States for Accessibility */
.table-of-contents a:focus,
.quick-action-card .btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Sidebar Animation on Load */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar-sticky > * {
    animation: slideInRight 0.5s ease-out;
}

.sidebar-sticky > *:nth-child(2) {
    animation-delay: 0.1s;
}

/* Improved Hover Effects for Better UX */
.table-of-contents li {
    transition: transform 0.2s ease;
}

.table-of-contents li:hover {
    transform: translateX(2px);
}
