/* Python AI Page Styling */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #1e293b;
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Header */
header {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    to {
        left: 100%;
    }
}

header h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-weight: 800;
}

.subtitle {
    font-size: 1.3rem;
    color: #64748b;
    font-weight: 300;
}

/* Sections */
section {
    background: white;
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

section h2 {
    color: #667eea;
    font-size: 2.2rem;
    margin-bottom: 20px;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

section h3 {
    color: #764ba2;
    font-size: 1.6rem;
    margin: 20px 0 10px;
}

section h4 {
    color: #334155;
    font-size: 1.2rem;
    margin: 15px 0 10px;
}

section p {
    margin-bottom: 15px;
    color: #475569;
    font-size: 1.05rem;
}

section ul {
    margin-left: 30px;
    margin-bottom: 15px;
}

section li {
    margin-bottom: 8px;
    color: #475569;
}

/* Advantages Grid */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.advantage-card {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.advantage-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.advantage-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.advantage-card h3 {
    color: #667eea;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.advantage-card p {
    color: #64748b;
    font-size: 0.95rem;
}

/* Foundation Grid */
.foundation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.tool-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.tool-card.numpy {
    border-top: 5px solid #4169E1;
}

.tool-card.pandas {
    border-top: 5px solid #150458;
}

.tool-header {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 25px;
    border-bottom: 2px solid #e2e8f0;
}

.tool-header h3 {
    color: #1e293b;
    font-size: 2rem;
    margin: 0;
}

.version {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
    display: block;
    margin-top: 5px;
}

.tool-description {
    padding: 25px;
}

.use-cases {
    padding: 0 25px 25px;
    background: #f8fafc;
}

/* Code Examples */
.code-example {
    margin: 20px 25px;
    border-radius: 10px;
    overflow: hidden;
    background: #1e293b;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.code-header {
    background: #334155;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-title {
    color: #e2e8f0;
    font-weight: 600;
}

.copy-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #764ba2;
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

.code-example pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.code-example code {
    font-family: 'Courier New', 'Consolas', monospace;
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Framework Comparison */
.framework-intro {
    background: #fef3c7;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #f59e0b;
    margin-bottom: 30px;
}

.framework-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.framework-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.framework-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.framework-card.tensorflow {
    border-top: 5px solid #FF6F00;
}

.framework-card.pytorch {
    border-top: 5px solid #EE4C2C;
}

.framework-card.keras {
    border-top: 5px solid #D00000;
}

.framework-header {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 25px;
    border-bottom: 2px solid #e2e8f0;
}

.framework-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
}

.creator {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
    margin-right: 10px;
}

.year {
    display: inline-block;
    background: #64748b;
    color: white;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
}

.framework-body {
    padding: 25px;
}

.description {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 20px;
}

.popularity {
    margin-top: 20px;
}

.bar-container {
    background: #e2e8f0;
    height: 25px;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 10px;
}

.bar {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: bold;
    transition: width 1s ease;
}

/* Framework Table */
.framework-table {
    margin-top: 40px;
    overflow-x: auto;
}

.framework-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.framework-table th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.framework-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.framework-table tr:hover {
    background: #f8fafc;
}

/* Examples Grid */
.example-intro {
    background: #e0f2fe;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #3b82f6;
    margin-bottom: 30px;
}

.examples-grid {
    display: grid;
    gap: 30px;
    margin-top: 30px;
}

.example-card {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 15px;
    padding: 30px;
    border: 2px solid #cbd5e1;
    transition: all 0.3s ease;
}

.example-card:hover {
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.example-card h3 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.example-desc {
    background: white;
    padding: 15px;
    border-radius: 8px;
    color: #64748b;
    margin-bottom: 20px;
}

.explanation {
    background: #fef3c7;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 4px solid #f59e0b;
}

.explanation strong {
    color: #92400e;
}

.explanation ul {
    margin: 10px 0 0 20px;
}

.explanation li {
    color: #78350f;
    margin: 5px 0;
}

/* Other Tools */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.tool-detail-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.tool-detail-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.tool-detail-card h3 {
    color: #667eea;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.tool-category {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 15px;
}

.mini-code {
    margin-top: 15px;
}

.mini-code pre {
    background: #1e293b;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

.mini-code code {
    font-family: 'Courier New', monospace;
    color: #e2e8f0;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Workflow Steps */
.workflow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.workflow-step {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    position: relative;
    transition: all 0.3s ease;
}

.workflow-step:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.step-num {
    position: absolute;
    top: -15px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.workflow-step h3 {
    color: #667eea;
    margin-bottom: 15px;
    padding-top: 10px;
}

.workflow-step pre {
    background: #1e293b;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

.workflow-step code {
    font-family: 'Courier New', monospace;
    color: #e2e8f0;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.tip-card {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tip-card:hover {
    transform: scale(1.05);
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.tip-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.tip-card h3 {
    color: #667eea;
    margin-bottom: 15px;
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.resource-card {
    background: linear-gradient(135deg, #e0f2fe, #bfdbfe);
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid #3b82f6;
    transition: all 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.resource-card h3 {
    color: #1e40af;
    margin-bottom: 15px;
}

.resource-card ul {
    list-style: none;
    margin: 0;
}

.resource-card li {
    padding: 8px 0;
    color: #1e40af;
    border-bottom: 1px solid #93c5fd;
}

.resource-card li:last-child {
    border-bottom: none;
}

.resource-card a {
    color: #1e40af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.resource-card a:hover {
    color: #667eea;
    text-decoration: underline;
}

/* Conclusion */
.conclusion-box {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 3px solid #f59e0b;
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
}

.conclusion-box p {
    color: #78350f;
    font-size: 1.1rem;
    line-height: 1.8;
}

.conclusion-box ul {
    margin: 15px 0 15px 30px;
}

.conclusion-box li {
    color: #78350f;
    margin: 10px 0;
    font-size: 1.05rem;
}

.final-note {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 5px solid #10b981;
}

.final-note strong {
    color: #047857;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    margin-top: 40px;
    color: #64748b;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeIn 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    section {
        padding: 20px;
    }

    section h2 {
        font-size: 1.8rem;
    }

    .advantages-grid,
    .foundation-grid,
    .framework-comparison,
    .examples-grid,
    .tools-grid,
    .workflow-steps,
    .tips-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }

    .code-example {
        margin: 20px 0;
    }

    .code-example code {
        font-size: 0.75rem;
    }

    .framework-table {
        font-size: 0.9rem;
    }

    .tool-card,
    .example-card {
        padding: 20px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Code Syntax Highlighting Enhancements */
.code-example code {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Hover Effects */
.advantage-card,
.framework-card,
.example-card,
.tool-detail-card,
.tip-card,
.resource-card {
    cursor: pointer;
}
