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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.inclined-plane-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.95;
}

main {
    padding: 30px;
}

.simulation-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-bottom: 30px;
}

.canvas-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#planeCanvas {
    width: 100%;
    height: auto;
    display: block;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.physics-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.info-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.info-item span:first-child {
    font-weight: 600;
    color: #495057;
    display: block;
    margin-bottom: 5px;
}

.info-item span:last-child {
    font-size: 1.5em;
    font-weight: 700;
    color: #667eea;
}

.vectors-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.vector-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.vector-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vector-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.vector-label {
    font-weight: 600;
    color: #495057;
}

.vector-value {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1em;
}

.controls-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.controls-panel h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5em;
}

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

.control-group {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.control-group label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #764ba2;
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #667eea;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.control-group input[type="range"]::-moz-range-thumb:hover {
    background: #764ba2;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.control-button {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    font-size: 1em;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-button.start {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.control-button.start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 239, 125, 0.4);
}

.control-button.pause {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.control-button.pause:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

.control-button.reset {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.control-button.reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.formulas-section {
    margin-top: 25px;
}

.force-display-section {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.force-display-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: #e9ecef;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.checkbox-label span {
    font-size: 0.95em;
    color: #495057;
}

.formulas-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
}

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

.formula-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.formula-label {
    font-weight: 600;
    color: #495057;
}

.formula {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #667eea;
    font-size: 1.05em;
}

.explanation {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.explanation h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.explanation h3 {
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.explanation p {
    line-height: 1.8;
    color: #495057;
    margin-bottom: 15px;
}

@media (max-width: 1024px) {
    .simulation-layout {
        grid-template-columns: 1fr;
    }

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

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

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

    .button-group {
        flex-direction: column;
    }

    .control-button {
        width: 100%;
    }
}
