/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Body Styling */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f4f7fa;
    color: #333;
}

/* Header Styling */
header {
    background: #344655;
    color: white;
    padding: 10px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #82b1d4;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

/* Toolbar */
#toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.tool-group {
    display: flex;
    flex-wrap: wrap;
    margin: 10px;
    align-items: center;
}

.tool-button {
    background-color: #024857;
    border: 1px solid #06c9f5;
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3px;
}

.tool-button i {
    font-size: 0.90rem;
    color: #e9e9e9;
}

/* Hover Effects */
.tool-button:hover {
    background-color: #0078d4;
    transform: scale(1.1);
    border-color: #005a9e;
}

.tool-button.active {
    background-color: #292929;
    color: white;
}

/* Input and Select Elements */
input[type="color"], input[type="range"], select {
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    transition: border-color 0.3s ease;
}

input[type="color"]:focus, input[type="range"]:focus, select:focus {
    border-color: #0078d4;
}

canvas.text-move { cursor: move !important; }
canvas.text-resize { cursor: nwse-resize !important; }
canvas.text-default { cursor: crosshair !important; }

/* Main Container */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

#whiteboard {
  touch-action: none; /* súper clave para tablets/móviles */
}

/* Whiteboard Container */
#whiteboard-container {
    position: relative;
    width: 90%;
    max-width: 1300px;
    height: 600px;
    border-radius: 10px;
    background-color: white;
    border: 3px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Canvas */
canvas {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background-color: #f7f7f7;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
    background: #496275;
    color: white;
    text-align: center;
    padding: 12px 20px;
    font-size: 0.9rem;
    margin-top: 20px;
}

/* Responsive Layout */
@media (max-width: 800px) {
    /*#toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }*/

    header {
        flex-direction: column;
        align-items: flex-start;
    }

    footer {
        font-size: 0.8rem;
    }

    #whiteboard-container {
        height: 400px;
    }
}

@media (max-width: 500px) {
    header {
        padding: 15px 20px;
    }

    .tool-group {
        /*flex-direction: column;
        gap: 10px;*/
    }

    .tool-button {
        padding: 8px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    footer {
        font-size: 0.75rem;
    }
}

#upload-image {
    display: none; /* Hide the input */
}

.tool-button {
    cursor: pointer;
}