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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

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

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.profile-input {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.profile-input input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    background: rgba(255,255,255,0.9);
    color: #333;
}

.profile-input input::placeholder {
    color: #666;
}

.profile-input button {
    padding: 12px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.profile-input button:hover {
    background: #45a049;
}

.import-section {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.import-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
}

.import-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.import-btn {
    padding: 12px 20px;
    background: #FF6B35;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.import-btn:hover {
    background: #E55A2B;
}

.import-info {
    font-size: 0.9rem;
    opacity: 0.8;
    font-style: italic;
}

.clipboard-btn {
    background: #9C27B0;
}

.clipboard-btn:hover {
    background: #7B1FA2;
}

.paste-area {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

.paste-area textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    resize: vertical;
    margin-bottom: 10px;
}

.paste-area textarea::placeholder {
    color: rgba(255,255,255,0.6);
}

.paste-area textarea:focus {
    outline: none;
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.15);
}

.paste-controls {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cancel-btn {
    padding: 8px 16px;
    background: rgba(244, 67, 54, 0.8);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s;
}

.cancel-btn:hover {
    background: rgba(244, 67, 54, 1);
}

.profiles-section, .games-section {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.profiles-section h2, .games-section h2 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

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

.refresh-button {
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.refresh-button:hover {
    background: #1976D2;
}

.refresh-button:active {
    transform: scale(0.98);
}

.refresh-button:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.refresh-icon {
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.refresh-button.refreshing .refresh-icon {
    animation: spin 1s linear infinite;
}

.profiles-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.profile-card {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255,255,255,0.2);
}

.profile-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.profile-games-count {
    font-size: 0.9rem;
    opacity: 0.8;
}

.remove-profile {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.8rem;
}

.remove-profile:hover {
    background: #da190b;
}

.games-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.games-controls input, .games-controls select {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: rgba(255,255,255,0.9);
    color: #333;
    font-size: 1rem;
}

.games-controls input {
    flex: 1;
    min-width: 200px;
}

.games-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.game-card {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.game-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.game-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.game-name {
    font-weight: bold;
    font-size: 1rem;
    line-height: 1.2;
}

.game-playtime {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.game-owners {
    font-size: 0.8rem;
    opacity: 0.7;
}

.owner-tag {
    display: inline-block;
    background: rgba(76, 175, 80, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 5px;
    margin-bottom: 2px;
    font-size: 0.7rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #2a5298;
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    text-align: center;
}

.loader {
    border: 4px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 4px solid #fff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid #f44336;
    color: #ffcdd2;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

.success-message {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
    color: #c8e6c9;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

.no-games {
    text-align: center;
    opacity: 0.7;
    font-style: italic;
    padding: 40px;
}

@media (max-width: 768px) {
    .profile-input {
        flex-direction: column;
    }
    
    .games-controls {
        flex-direction: column;
    }
    
    .games-controls input {
        min-width: auto;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .section-header h2 {
        margin-bottom: 10px;
    }
    
    .import-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .import-info {
        text-align: center;
    }
    
    .paste-controls {
        flex-direction: column;
    }
    
    .paste-area textarea {
        font-size: 14px;
    }
}