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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #C8E6C9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.container {
    background: #E8F5E9;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 15px;
    background: white;
    transition: border-color 0.3s ease;
}

select:focus {
    outline: none;
    border-color: #4CAF50;
}

.generate-btn {
    width: 100%;
    padding: 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.generate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.result-container {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #4CAF50;
    display: none;
}

.result-container.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.title-display {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e1e1e1;
    min-height: 80px;
}

.generated-title {
    flex: 1;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    font-weight: 500;
}

.dice-btn {
    background: linear-gradient(135deg, #81C784 0%, #4CAF50 100%);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
}

.dice-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.dice-btn:active {
    transform: scale(0.95) rotate(-15deg);
}

.dice-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.dice-icon {
    font-size: 24px;
    color: white;
    transition: transform 0.3s ease;
}

.dice-btn.rolling .dice-icon {
    animation: roll 0.6s ease-in-out;
}

@keyframes roll {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(90deg); }
    50% { transform: rotate(180deg); }
    75% { transform: rotate(270deg); }
}

.loading {
    text-align: center;
    color: #4CAF50;
    font-style: italic;
}

.error {
    color: #e74c3c;
    background: #fdf2f2;
    border-left-color: #e74c3c;
}

.title-counter {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.footer {
    text-align: center;
    padding: 15px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 13px;
    color: #666;
    position: absolute;
    bottom: 0;
    width: 100%;
}

.footer p {
    margin: 0;
    font-weight: 400;
}

.author-name {
    font-weight: 600;
    color: #333;
}