/* Base mobile-first styles */
.main-container {
    max-width: 1200px;
    margin: 7rem auto 3rem;
    padding: 0 1rem;
}

.split-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.operations-panel {
    width: 100%;
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.visualization-container {
    width: 100%;
    background-color: rgba(18, 18, 18, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    padding: 1rem;
    min-height: 400px;
}

.visualization-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(0, 242, 255, 0.05), 
        rgba(138, 43, 226, 0.05));
    z-index: -1;
}

.section-title {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    padding-bottom: 0.5rem;
    color: var(--text);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-alt));
    border-radius: 2px;
}

#container {
    width: 100%;
    height: 100%;
    min-height: 400px;
    position: relative;
}

.operations-panel input, 
.operations-panel button {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    color: var(--text);
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 44px; /* Touch-friendly size */
}

.operations-panel input::placeholder {
    color: var(--text-secondary);
}

.operations-panel input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 242, 255, 0.2);
}

.operations-panel button {
    background: linear-gradient(45deg, rgba(0, 242, 255, 0.1), rgba(138, 43, 226, 0.1));
    font-weight: 600;
    cursor: pointer;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.operations-panel button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent);
    transition: all 0.5s ease;
    z-index: -1;
}

.operations-panel button:hover,
.operations-panel button:active {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.operations-panel button:hover::before {
    left: 100%;
}

.operation-group {
    margin-bottom: 1rem;
}

.operation-group h4 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.operation-group div[style*="display: flex"] {
    display: flex;
    gap: 0.5rem;
}

.operation-group div[style*="display: flex"] button {
    flex: 1;
    min-width: 44px;
}

.info-panel {
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    margin-bottom: 2rem;
}

.info-panel h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    position: relative;
    padding-bottom: 0.3rem;
}

.info-panel h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-alt));
    border-radius: 2px;
}

.info-panel p {
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    line-height: 1.5;
}

.info-panel code {
    display: block;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0.6rem;
    border-radius: 8px;
    margin: 0.8rem 0;
    border: 1px solid var(--glass-border);
    color: var(--accent);
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    font-size: 0.85rem;
}

/* Tablet and larger screens */
@media (min-width: 768px) {
    .main-container {
        padding: 0 2rem;
    }
    
    .split-container {
        flex-direction: row;
        gap: 1.5rem;
    }
    
    .operations-panel {
        width: 30%;
        padding: 1.5rem;
    }
    
    .visualization-container {
        width: 70%;
        min-height: 500px;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .section-title::after {
        width: 80px;
    }
    
    #container {
        min-height: 500px;
    }
    
    .info-panel {
        padding: 1.5rem;
    }
    
    .info-panel h3 {
        font-size: 1.3rem;
    }
}

/* Desktop screens */
@media (min-width: 1024px) {
    .operations-panel {
        width: 25%;
    }
    
    .visualization-container {
        width: 75%;
        min-height: 600px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-title::after {
        width: 100px;
    }
    
    #container {
        min-height: 600px;
    }
    
    .info-panel h3 {
        font-size: 1.4rem;
    }
    
    .operations-panel input, 
    .operations-panel button {
        padding: 0.8rem 1rem;
    }
}
