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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
}

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

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

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

h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

.link-input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

#linkInput {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#linkInput:focus {
    outline: none;
    border-color: #667eea;
}

.primary-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.link-display {
    margin-bottom: 30px;
    animation: slideDown 0.3s ease-out;
}

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

.link-box {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#generatedLink {
    flex: 1;
    padding: 15px;
    border: 2px solid #4caf50;
    border-radius: 10px;
    font-size: 1rem;
    background: #f0f9f0;
}

.copy-btn {
    padding: 15px 25px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #45a049;
}

.success-message {
    color: #4caf50;
    font-weight: 600;
    text-align: center;
    padding: 10px;
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.hidden {
    display: none;
}

.shared-links-section {
    margin-top: 40px;
}

.shared-links-section h2 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.links-list {
    list-style: none;
}

.links-list li {
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
    margin-bottom: 10px;
    word-break: break-all;
    transition: background 0.3s;
}

.links-list li:hover {
    background: #e8e8e8;
}

.empty-state {
    color: #999;
    text-align: center;
    font-style: italic;
}

.link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.link-url {
    color: #667eea;
    text-decoration: none;
    flex: 1;
    margin-right: 10px;
}

.link-url:hover {
    text-decoration: underline;
}

.delete-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.delete-btn:hover {
    background: #ff5252;
}

footer {
    margin-top: 40px;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

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

    h1 {
        font-size: 2rem;
    }

    .link-input-section {
        flex-direction: column;
    }

    .link-box {
        flex-direction: column;
    }
}
