/* General Styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f0f0;
    color: #333333;
    display: flex;
    min-height: 100vh;
}

/* App Container */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    padding: 15px;
    box-shadow: 1px 0 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    border-right: 1px solid #e0e0e0;
}

.sidebar h2 {
    color: #444444;
    margin-top: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.sidebar p {
    color: #666666;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Duration Selector */
.duration-selector {
    margin: 20px 0;
    background-color: #fafafa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.duration-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444444;
    font-size: 1rem;
}

.duration-selector select {
    width: 100%;
    padding: 10px;
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
}

.duration-selector select:focus {
    outline: none;
    border-color: #666666;
}

/* Sidebar Button */
.sidebar-button {
    width: 100%;
    padding: 12px;
    background-color: #444444;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin: 15px 0;
    transition: background-color 0.2s;
}

.sidebar-button:hover {
    background-color: #333333;
}

/* Difficulty Info */
.difficulty-info h3, .instructions h3 {
    color: #444444;
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 5px;
}

.difficulty-info ul {
    padding-left: 20px;
    margin: 10px 0;
}

.difficulty-info li {
    margin: 8px 0;
    line-height: 1.4;
    font-size: 0.9rem;
    color: #666666;
}

.difficulty-easy {
    color: #666666 !important;
}

.difficulty-medium {
    color: #666666 !important;
}

.difficulty-hard {
    color: #666666 !important;
}

.difficulty-expert {
    color: #666666 !important;
}

/* Instructions */
.instructions {
    background-color: #fafafa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    margin-top: 20px;
}

.instructions ol {
    padding-left: 20px;
    margin: 10px 0;
}

.instructions li {
    margin: 8px 0;
    line-height: 1.4;
    font-size: 0.9rem;
    color: #666666;
}

/* Game Area */
.game-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background-color: #f8f8f8;
}

.container {
    text-align: center;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 350px;
    width: 100%;
}

h1 {
    margin-top: 0;
    font-size: 1.5rem;
    color: #444444;
    font-weight: 600;
}

#timer, #difficulty {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    margin: 8px 0;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    background-color: #fafafa;
    color: #444444;
    white-space: nowrap;
}

#timer {
    border: 1px solid #cccccc;
}

#difficulty {
    border: 1px solid #cccccc;
    font-weight: 600;
}

#message {
    font-size: 1rem;
    margin: 15px 0;
    color: #666666;
    min-height: 3em;
    line-height: 1.4;
    padding: 12px;
    border-radius: 4px;
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
}

#message strong {
    color: #444444;
    font-size: 1.1rem;
}

/* Canvas Styling */
#mazeCanvas {
    border: 1px solid #cccccc;
    background-color: #ffffff;
    margin: 10px auto;
    border-radius: 2px;
}

#calibrationVideoContainer {
    margin: 10px auto;
    width: 300px;
    height: 250px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    background-color: #000;
}

/* Hidden Video Element */
#inputVideo {
    display: none;
}

/* Controls Container */
.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

/* Buttons */
button {
    padding: 10px 15px;
    background-color: #444444;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    min-width: 100px;
}

button:hover {
    background-color: #333333;
}

/* Share Section */
.share-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #fafafa;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.share-section h3 {
    margin-top: 0;
    color: #444444;
    font-size: 1.1rem;
    font-weight: 600;
}

.share-section p {
    font-size: 1rem;
    margin: 10px 0;
    color: #666666;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.share-button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    flex: 1;
    min-width: 100px;
    font-size: 0.9rem;
}

.twitter {
    background-color: #444444;
    color: white;
}

.facebook {
    background-color: #444444;
    color: white;
}

.whatsapp {
    background-color: #25D366;
    color: white;
}

.download {
    background-color: #444444;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-height: none;
    }
    
    .game-area {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
    }
    
    .share-buttons {
        flex-direction: column;
    }
}