@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Rubik', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.logo-title {
    height: 3.5rem; /* Mesma altura aproximada do h1 */
    width: auto;
    margin-bottom: 5px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}


.header p {
    color: #95a5a6;
    font-size: 1rem;
}

.cube-image {
    width: 150px;
    height: 150px;
    margin: 20px auto;
    display: block;
}

.timer-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.timer-display {
    font-family: 'Courier New', monospace;
    font-size: 4rem;
    font-weight: bold;
    text-align: center;
    margin: 20px 0;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.message {
    text-align: center;
    font-size: 1.2rem;
    color: #95a5a6;
    margin-bottom: 20px;
}

.scramble-text {
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid #e74c3c;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-family: monospace;
    font-size: 0.9rem;
}

.btnContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.btn {
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #e74c3c;
}

.btn-danger:hover {
    background: rgba(231, 76, 60, 0.3);
}

.btn-group {
    display: flex;
    gap: 10px;
}

.btn-group .btn {
    flex: 1;
}

button {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.stats-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.stats-card.best-time {
    animation: pulse 2s infinite;
}

.stats-label {
    color: #95a5a6;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.stats-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.footer-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.footer {
    margin-top: 30px;
    color: #95a5a6;
    font-size: 0.8rem;
    text-align: center;
}

.footer a {
    color: #e74c3c;
    text-decoration: none;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    padding: 20px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: bold;
}

.close-btn {
    background: none;
    border: none;
    color: #95a5a6;
    font-size: 1.2rem;
    cursor: pointer;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: #e74c3c #1a1a2e;
}

.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.history-list::-webkit-scrollbar-thumb {
    background-color: #e74c3c;
    border-radius: 3px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.history-index {
    color: #95a5a6;
    width: 30px;
}

.history-time {
    font-family: monospace;
    flex-grow: 1;
}

.history-date {
    color: #95a5a6;
    font-size: 0.8rem;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.modal-footer .btn {
    flex: 1;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

.settings-group {
    margin-bottom: 20px;
}

.settings-label {
    display: block;
    margin-bottom: 8px;
    color: #95a5a6;
}

.settings-select {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: white;
    margin-bottom: 15px;
}

.settings-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.settings-checkbox input {
    margin-right: 10px;
}

.png-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 10px;
}

.png-loading-message {
    color: white;
    font-size: 1.2rem;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    transform-style: preserve-3d;
    will-change: transform;
}

.html2canvas-container * {
    animation: none !important;
    transition: none !important;
}

.instruction-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 1.2rem;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-align: center;
    max-width: 80%;
}

.instruction-message.show {
    opacity: 1;
}