:root {
    --main-font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', Oxygen, Ubuntu, Cantarell, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--main-font-family);
}

body {
    font-family: var(--main-font-family);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    line-height: 1.6;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 600px;
    width: 100%;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.string-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.string-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.length-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.length-label {
    font-size: 14px;
    color: #6c757d;
}

input[type=number] {
    width: 60px;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
}

input[type=number]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.spin-btn {
    width: 34px;
    height: 34px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
}

.spin-btn:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.spin-btn:active {
    background: #e0e4ff;
}

.string-display {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    word-break: break-all;
    color: #212529;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.string-text {
    flex: 1;
    min-width: 0;
}

.copy-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

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

.copy-btn.copied {
    background: #10b981;
}

.refresh-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.icon {
    display: inline-block;
    width: 18px;
    height: 18px;
}

/* SVG size modifier helpers (use on top of .icon) */
.icon--lg {
    width: 1.8rem;
    height: 1.8rem;
    vertical-align: middle;
}

.icon--md {
    width: 1.35rem;
    height: 1.35rem;
    vertical-align: middle;
}

.icon--sm {
    width: 1.3rem;
    height: 1.3rem;
    vertical-align: middle;
}

.icon--xs {
    width: 1.25rem;
    height: 1.25rem;
    vertical-align: middle;
}

@media (max-width: 600px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 24px;
    }

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

    .string-display {
        font-size: 14px;
        flex-direction: column;
        align-items: stretch;
    }

    .copy-btn {
        width: 100%;
    }
}

/* Specific emoji font stack for icon elements only */
.icon,
h1 {
    font-family: 'Segoe UI Emoji', 'Segoe UI Symbol', 'Apple Color Emoji', 'Noto Color Emoji', 'Android Emoji', 'EmojiSymbols', sans-serif;
}

/* Footer */
/* Site title (clickable) */
.site-title {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.site-title svg {
    opacity: 0.95;
}

/* Make the dice/logo act like a small icon button next to the title */
.logo-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin-right: 0.5rem;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.logo-btn:focus {
    outline: 3px solid rgba(102, 126, 234, 0.15);
    border-radius: 6px;
}

.version-note {
    margin-top: 0.25rem;
    color: #c6d9ea;
    /* match the pale blue */
    font-size: 0.85rem;
    text-align: center;
    font-weight: 500;
}

/* Project link shown above the version note */
.project-link {
    text-align: center;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}


.project-link a {
    color: #c6d9ea;
    /* very pale blue like the screenshot */
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.project-link a:hover {
    color: #9fbfe0;
    border-color: rgba(159, 191, 224, 0.18);
    transform: translateY(-1px);
}

.project-link a:active {
    transform: translateY(0);
}