body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    margin: 2rem;
}

.header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 500;
}

.input-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#url-input {
    flex-grow: 1;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

#shorten-button {
    background-color: #ffde00;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
}

#result {
    display: none;
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.short-url-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.short-url {
    font-size: 1.2rem;
    font-weight: 500;
    color: #000;
    text-decoration: none;
}

.actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.copy-button,
.action-button {
    background: none;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.qrcode-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.qrcode-popup {
    display: none;
    position: absolute;
    top: -95px;
    background-color: #fff;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    z-index: 10;
    width: max-content;
    opacity: 0;
    transition: opacity 0.2s ease-in-out, top 0.2s ease-in-out;
    pointer-events: none;
}

.qrcode-container:hover .qrcode-popup {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    opacity: 1;
    top: -115px;
    pointer-events: auto;
}

.qrcode-popup p {
    margin: 0;
    font-weight: 500;
    color: #333;
    text-align: left;
}

.export-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.export-button {
    background-color: #f0f2f5;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.export-button:hover {
    background-color: #e2e6ea;
}

.qrcode-popup .action-button {
    background-color: #f0f2f5;
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    line-height: 1;
}

.qrcode-popup .action-button:hover {
    background-color: #e2e6ea;
}

.footer {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
}

.footer a {
    margin-left: 1rem;
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 1.5rem;
    border: none;
    width: 90%;
    max-width: 450px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-header {
    font-size: 1.5rem;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.tabs {
    display: flex;
    background-color: #f0f2f5;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 1.5rem;
}

.tab-button {
    flex: 1;
    padding: 0.6rem;
    border: none;
    background-color: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    transition: background-color 0.2s, color 0.2s;
}

.tab-button.active {
    background-color: #fff;
    color: #000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

.color-settings {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.color-input-group label {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 0.75rem;
}

.color-picker-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.color-picker-container input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    background-color: transparent;
}

.color-picker-container input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-container input[type="color"]::-webkit-color-swatch {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.color-picker-container span {
    font-family: monospace;
    font-size: 1rem;
    color: #333;
}

.modal-footer {
    margin-top: 2rem;
}

#apply-settings-button {
    background-color: #000;
    color: #fff;
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
}


/* Share Modal */
#share-modal .modal-content {
    max-width: 550px;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.share-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #000;
    font-size: 0.8rem;
    width: 80px;
    text-align: center;
}

.share-button img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

