/* Основные стили как на randstuff.ru */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Шапка с оранжевым градиентом */
.header {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
    color: white;
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.header p {
    font-size: 16px;
    opacity: 0.95;
    font-weight: 300;
}

/* Основной контент */
.main-content {
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Крупное число */
.random-number-container {
    text-align: center;
    margin: 30px 0 40px;
    padding: 40px 30px;
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    width: 100%;
    max-width: 700px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.random-number-label {
    font-size: 20px;
    color: #6c757d;
    margin-bottom: 20px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.random-number {
    font-family: 'Roboto', sans-serif;
    font-size: 96px;
    font-weight: 800;
    color: #343a40;
    margin: 25px 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    line-height: 1;
    letter-spacing: -1px;
}

.counter {
    color: #6c757d;
    font-size: 15px;
    margin-top: 25px;
    font-weight: 400;
}

/* Блок управления */
.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 25px 0;
    width: 100%;
    max-width: 700px;
}

/* Главная кнопка с оранжевым градиентом */
.main-button {
    background: linear-gradient(to bottom, #ff8c00 0%, #ff6b00 100%);
    color: white;
    border: none;
    padding: 18px 35px;
    font-size: 19px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
    width: 100%;
    max-width: 500px;
    letter-spacing: 0.3px;
}

.main-button:hover {
    background: linear-gradient(to bottom, #ff9500 0%, #ff7300 100%);
    box-shadow: 0 6px 16px rgba(255, 107, 0, 0.4);
    transform: translateY(-2px);
}

.main-button:active {
    transform: translateY(0);
}

/* Блок диапазона */
.range-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.range-input {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.range-input label {
    font-size: 15px;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 400;
}

.range-input input {
    width: 110px;
    padding: 10px 14px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    text-align: center;
    font-size: 17px;
    font-family: 'Roboto', sans-serif;
    color: #495057;
    transition: border-color 0.3s;
}

.range-input input:focus {
    outline: none;
    border-color: #ff8c00;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

.or-text {
    color: #adb5bd;
    font-size: 17px;
    font-weight: 500;
    margin: 0 5px;
}

/* Дополнительные кнопки */
.additional-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 30px 0 40px;
    width: 100%;
}

.secondary-button {
    background-color: #fff;
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 14px 22px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
}

.secondary-button:hover {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

/* Блок истории */
.history-section {
    width: 100%;
    max-width: 700px;
    margin-top: 40px;
    border-top: 1px solid #e9ecef;
    padding-top: 30px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.history-title {
    font-size: 19px;
    color: #495057;
    font-weight: 500;
}

.clear-history-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    padding: 5px;
    transition: color 0.3s;
}

.clear-history-btn:hover {
    color: #ff8c00;
}

.history-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 20px;
}

.history-item {
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item:last-child {
    border-bottom: none;
}

.history-number {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    color: #343a40;
    font-size: 20px;
}

.history-time {
    color: #6c757d;
    font-size: 14px;
    font-weight: 400;
}

.history-empty {
    text-align: center;
    color: #adb5bd;
    padding: 30px;
    font-style: italic;
}

/* Информационный блок */
.info-box {
    background-color: #fff3e0;
    border-left: 4px solid #ff8c00;
    padding: 22px;
    margin-top: 35px;
    width: 100%;
    max-width: 700px;
    border-radius: 0 8px 8px 0;
}

.info-title {
    font-weight: 600;
    color: #343a40;
    margin-bottom: 12px;
    font-size: 17px;
}

.info-text {
    color: #495057;
    font-size: 15px;
    line-height: 1.6;
}

/* Футер */
.footer {
    background-color: #f8f9fa;
    padding: 25px;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    border-top: 1px solid #e9ecef;
    margin-top: 40px;
}

.footer a {
    color: #ff8c00;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Анимация для числа */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Адаптивность */
@media (max-width: 768px) {
    .random-number {
        font-size: 72px;
    }
    
    .main-content {
        padding: 30px 20px;
    }
    
    .range-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .or-text {
        margin: 10px 0;
    }
    
    .header h1 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .random-number {
        font-size: 60px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .main-button {
        font-size: 17px;
        padding: 16px 25px;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .history-time {
        align-self: flex-end;
    }
}