body { 
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    margin: 0; 
    padding: 0; 
    background-color: #1a1a1a;
    color: #f0f0f0;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

:root {
    --red-primary: #cb0000;
    --red-shadow: rgba(255, 0, 0, 0.6);
    --red-glow-border: #ff3333;
    --glass-background: rgba(40, 40, 40, 0.7);
    --text-color: #f0f0f0;
}

header, footer {
    background-color: var(--glass-background);
    color: var(--red-primary);
    padding: 20px 40px;
    box-shadow: 0 4px 15px var(--red-shadow);
    border-bottom: 1px solid var(--red-glow-border);
    width: 100%;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    text-align: center;
}

header {
    border-bottom: 1px solid var(--red-glow-border);
}

footer {
    margin-top: auto;
    border-top: 1px solid var(--red-glow-border);
    border-bottom: none;
    box-shadow: 0 -4px 15px var(--red-shadow);
}

h1 {
    margin: 3px auto;
    font-size: 1.8em;
    font-weight: 700;
    text-shadow: 0 0 10px var(--red-shadow);
}

main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    flex-grow: 1;
    width: 100%;
    box-sizing: border-box;
}

.npm-package {
    background-color: var(--glass-background);
    border: 1px solid var(--red-glow-border);
    border-radius: 12px;
    box-shadow: 0 0 25px var(--red-shadow);
    padding: 25px;
    margin-bottom: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.npm-package:hover {
    box-shadow: 0 0 40px var(--red-shadow);
    transform: translateY(-5px);
}

.package-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.package-header h2.npm-name-red {
    margin: 0;
    font-size: 1.6em;
    color: var(--red-primary); 
    text-shadow: 0 0 5px rgba(0, 0, 0, 1);
}

.version-badge {
    background-color: var(--red-primary);
    color: var(--text-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    border: 1px solid var(--red-glow-border);
    box-shadow: 0 0 8px var(--red-shadow);
}

.red-title {
    color: var(--red-primary);
    font-weight: 700;
    text-shadow: 0 0 3px var(--red-shadow);
}

.install-cmd-style {
    font-family: 'Consolas', 'Courier New', monospace;
    background-color: #2c2c2c;
    padding: 3px 6px;
    border-radius: 4px;
    color: #00ff00;
    font-size: 0.9em;
    border: 1px solid #444;
    display: inline-block;
    word-break: break-all;
}

.package-info-block {
    font-size: 1em;
    margin-bottom: 25px;
    padding: 10px;
    font-family: 'Consolas', 'Courier New', monospace;
    background-color: #2c2c2c;
    border-radius: 6px;
    color: #00ff00; 
    border: 1px solid #444;
}

.package-details p {
    margin: 8px 0;
    font-size: 0.95em;
}

.keywords-list {
    margin-bottom: 15px;
}

.dependencies-list {
    margin-top: 5px;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dep-item, .keyword-item {
    font-size: 0.85em;
    white-space: nowrap;
}

.package-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
}

.install-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.cmd-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-basis: 100%;
    margin-bottom: 10px;
}

.install-cmd {
    font-family: 'Consolas', 'Courier New', monospace;
    background-color: #2c2c2c;
    padding: 8px 12px;
    border-radius: 6px;
    color: #00ff00;
    font-size: 0.9em;
    border: 1px solid #444;
    user-select: all;
    word-break: break-all;
    cursor: default;
}

.equal-size-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color 0.2s, box-shadow 0.2s;
    text-align: center;
    box-sizing: border-box;
    flex-grow: 1;
    max-width: 48%;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.npm-link-btn {
    background-color: var(--red-primary);
    color: white;
    box-shadow: 0 0 10px var(--red-shadow);
}

.npm-link-btn:hover {
    background-color: #ff3333;
    box-shadow: 0 0 15px var(--red-shadow);
}

.copy-btn.npm-link-btn {
    background-color: var(--red-primary);
    color: white;
    box-shadow: 0 0 10px var(--red-shadow);
}

.copy-btn.npm-link-btn:hover {
    background-color: #ff3333;
    box-shadow: 0 0 15px var(--red-shadow);
}

footer p {
    margin: 5px 0;
    color: var(--red-primary);
}

footer a {
    color: var(--red-primary);
    text-decoration: none;
    font-weight: 600;
    text-shadow: 0 0 5px var(--red-shadow);
}

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

.error-message {
    color: var(--red-primary);
    font-weight: bold;
    padding: 15px;
    background-color: #301919;
    border: 1px solid var(--red-primary);
    border-radius: 5px;
    text-align: center;
}

@media (max-width: 600px) {
    header, footer {
        padding: 15px 10px;
    }
    .package-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .version-badge {
        margin-top: 10px;
        align-self: flex-end;
    }
    .package-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .equal-size-btn {
        max-width: 100%;
        margin-top: 10px;
    }
    .install-section {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 0;
    }
    .cmd-container {
        margin-top: 5px;
        margin-bottom: 5px;
    }
}
