/* Carbon Nanomaterials Visualization Styles */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
header {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    font-size: 2.5em;
    color: #00d4ff;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.subtitle {
    font-size: 1.1em;
    color: #a0a0a0;
}

/* Material Navigation */
.material-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.material-btn {
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.material-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.material-btn.active {
    background: rgba(0, 212, 255, 0.3);
    border-color: #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* Visualization Layout */
.visualization-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    margin-bottom: 40px;
}

/* Canvas Panel */
.canvas-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#threeCanvas {
    width: 100%;
    height: 500px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
}

.material-info {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.info-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9em;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item span:first-child {
    color: #00d4ff;
    font-weight: 600;
    margin-right: 8px;
}

/* Controls Panel */
.controls-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.controls-panel h3 {
    color: #00d4ff;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.controls-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 0.9em;
    color: #b0b0b0;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00d4ff;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00d4ff;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #00d4ff;
}

/* Type Badges */
.type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.type-badge.metallic {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.5);
}

.type-badge.semiconducting {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.5);
}

/* Button Group */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.control-button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.control-button.reset {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.5);
}

.control-button.reset:hover {
    background: rgba(255, 107, 107, 0.3);
    transform: translateY(-2px);
}

.control-button.rotate {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.5);
}

.control-button.rotate:hover {
    background: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

/* Properties Section */
.properties-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.properties-section h3 {
    color: #00d4ff;
    margin-bottom: 25px;
    font-size: 1.5em;
    text-align: center;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.property-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.3);
}

.property-card h4 {
    color: #00d4ff;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.property-value {
    font-size: 1.5em;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 10px;
}

.property-card p {
    font-size: 0.9em;
    color: #a0a0a0;
    line-height: 1.5;
}

/* Electronic Structure Section */
.electronic-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.electronic-section h3 {
    color: #00d4ff;
    margin-bottom: 20px;
    font-size: 1.5em;
    text-align: center;
}

#bandStructureCanvas {
    width: 100%;
    height: 300px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin-bottom: 20px;
}

.band-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

/* Chirality Section */
.chirality-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chirality-section h3 {
    color: #00d4ff;
    margin-bottom: 20px;
    font-size: 1.5em;
    text-align: center;
}

#chiralityCanvas {
    width: 100%;
    height: 300px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin-bottom: 20px;
}

.chirality-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

/* Formulas Section */
.formulas-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.formulas-section h3 {
    color: #00d4ff;
    margin-bottom: 20px;
    font-size: 1.5em;
    text-align: center;
}

.formula-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.formula-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #00d4ff;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.formula-label {
    font-weight: 600;
    color: #ffd700;
    min-width: 200px;
}

.formula {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 15px;
    border-radius: 5px;
    flex: 1;
}

/* Applications Section */
.applications-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.applications-section h3 {
    color: #00d4ff;
    margin-bottom: 25px;
    font-size: 1.5em;
    text-align: center;
}

.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.application-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.application-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.3);
}

.application-card h4 {
    color: #00d4ff;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.application-card p {
    font-size: 0.9em;
    color: #a0a0a0;
    line-height: 1.5;
}

/* Synthesis Section */
.synthesis-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.synthesis-section h3 {
    color: #00d4ff;
    margin-bottom: 25px;
    font-size: 1.5em;
    text-align: center;
}

.synthesis-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.synthesis-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.synthesis-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.15);
}

.synthesis-item h4 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.synthesis-item p {
    font-size: 0.9em;
    color: #a0a0a0;
    line-height: 1.5;
}

/* Explanation Section */
.explanation {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.8;
}

.explanation h2 {
    color: #00d4ff;
    margin-bottom: 20px;
    font-size: 1.8em;
    text-align: center;
}

.explanation h3 {
    color: #ffd700;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.explanation p {
    color: #b0b0b0;
    margin-bottom: 15px;
    font-size: 1.05em;
}

.explanation strong {
    color: #00d4ff;
}

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

    .material-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .material-nav {
        gap: 10px;
    }

    .material-btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .properties-grid,
    .applications-grid,
    .synthesis-list,
    .band-info,
    .chirality-info {
        grid-template-columns: 1fr;
    }

    #threeCanvas {
        height: 350px;
    }
}
